﻿/*** 公共 Complete START ***/
var publicComplete = function(){
	$(".pop_confirm_subset").removeClass("a_as_disabled");
}
/*** 公共 Complete END ***/

/*** 公共 Callback START ***/

//*************************************
//* 公共
//* 获取“登录者信息”callback
//*************************************
var getUserInfoCallback = function(back){
	if (back.code == 0) {
		var userName = back.data.userName ? back.data.userName : look._I18N_DATA.$303/**无效用户**/,
			userId =  back.data.uid ? back.data.uid : look.generateGuid();
		look._ADMIN.Set_NAME(look._ADMIN.Get_NAME() ? look._ADMIN.Get_NAME() : userName); look._ADMIN.uid = userId;
		$("#userNameCell").text(userName);
		if (back.data.authens) {
			look._AUTHEN.application = back.data.authens.application;
			look._AUTHEN.uc = back.data.authens.uc;
			look._AUTHEN.app = back.data.authens.app;
			look._AUTHEN.cs = back.data.authens.cs;
			look._AUTHEN.da = back.data.authens.da;
			look._AUTHEN.misEmpire = back.data.authens.mis_empire;
			look._AUTHEN.misSail = back.data.authens.mis_eos;
			look._AUTHEN.misFlight = back.data.authens.mis_flight;
			look._AUTHEN.payment = back.data.authens.payment;
			look._AUTHEN.gameHelp = back.data.authens.game_help;
			look._AUTHEN.coupon = back.data.authens.coupon;
			look._AUTHEN.webChat = back.data.authens.web_chat;
			look._AUTHEN.appleTop = back.data.authens.apple_top;
		}else {
			look.showInfo.error(back.code + look._I18N_DATA.$437/**：权限信息获取失败，请重新登录**/);
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 公共
//* 获取“菜单信息”callback
//*************************************
var getMenuCallback = function(back){
	var menuHtml = '';
	var url = "",type = "",theme = "",dream = "";
	for(var i = 0; i < back.data.length; i++){
		menuHtml += '<li><a href="javascript:">' + back.data[i].name + '</a></li><ul show="true">';
		for(var j = 0; j < back.data[i].subMenus.length; j++){
			if(back.data[i].subMenus[j].url){
				url = back.data[i].subMenus[j].url;
				theme = look.getStringParam("theme", url) ? look.getStringParam("theme", url) : "";
				type = look.getStringParam("type", url) ? look.getStringParam("type", url) : "";
				dream = look.getStringParam("dream", url) ? look.getStringParam("dream", url) : "";
			}else{
				url = "javascript:";theme = "";type = "";dream = "";
			}
			menuHtml += '<li><a href="' + url + '" theme="' + theme + '" type="' + type + '" dream="' + dream + '">' + back.data[i].subMenus[j].name + '</a></li>';
			if (back.data[i].subMenus[j].subMenus) {
				if (back.data[i].subMenus[j].subMenus.length > 0) {
					menuHtml += "<ul>";
					for (var k = 0; k < back.data[i].subMenus[j].subMenus.length; k++) {
						if (back.data[i].subMenus[j].subMenus[k].url != "") {
							url = back.data[i].subMenus[j].subMenus[k].url;
							theme = look.getStringParam("theme", url) ? look.getStringParam("theme", url) : "";
							type = look.getStringParam("type", url) ? look.getStringParam("type", url) : "";
							dream = look.getStringParam("dream", url) ? look.getStringParam("dream", url) : "";
						}
						else {
							url = "javascript:";theme = "";type = "";dream = "";
						}
						menuHtml += '<li><a href="' + url + '" theme="' + theme + '" type="' + type + '" dream="' + dream + '">' + back.data[i].subMenus[j].subMenus[k].name + '</a></li>';
					}
					menuHtml += "</ul>";
				}
			}
		}
		menuHtml += "</ul>";
	}
	$("#navPanel ul").html(menuHtml);
	
	$(".look_tree").looktree();
	publicInit.menuSet();
	publicInit.menuDateSet({
		element: "theme",
		string: "data"
	});
	publicInit.menuDateSet({
		element: "type",
		string: "income_analysis",
		from: look.dateFormat(look.addDaysByDate(look.getLocalDate(), -10), "yyyy-MM-dd")
	});
}

//*************************************
//* 客服系统 -> 客服反馈
//* 获取“游戏应用信息字典”callback
//*************************************
var getAppInfoDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data.length != 0) {
				look._APP_INFO_DIC_ARRAY.length = 0;
				$.each(back.data, function(i, list){
					var serversArray = new Array();
					$.each(back.data[i].servers, function(j, server){
						serversArray.push(server.id + ":" + server.name);
					});
					look._APP_INFO_DIC_ARRAY.push(new Array(list.appid, list.name, serversArray));
				});
				$("#appIdSelect").length != 0 ? getAppInfoDictionaryCallback.Assay() : null;
				$("#localeIdSelect").length != 0 ? getAppInfoDictionaryCallback.AssayGame() : null;
			}
			else {
				look.showInfo.error(back.code + look._I18N_DATA.$412/**：游戏应用信息字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay : function(callback){
		look._APP_INFO_DIC_ARRAY.length == 1 ? $("#appIdSelect").empty() : $("#appIdSelect").children().first().nextAll().remove();
		$.map(look._APP_INFO_DIC_ARRAY, function(n){
			$("#appIdSelect").append('<option value="' + n[0] + '" s_id="' + n[2] + '">' + n[1] + '</option>');
		});
		//[事件]
		$("#appIdSelect").bind("change", function(){
			selectChangeFn($(this).val());
		}).children("option[value='" + look.getHashParam("appid") + "']").attr("selected", "selected");
		
		selectChangeFn($("#appIdSelect option[value='" + look.getHashParam("appid") + "']"));
		function selectChangeFn(appId){
			var serverId = $("#appIdSelect option:selected").attr("s_id"),
				selectHtml = "", checkboxHtml = "", serverIdArray = new Array();
			$("#serverIdSelect, #serverIdCheckbox").hide().children().remove();
			if(serverId){
				serverIdArray = serverId.split(",");
				$.each(serverIdArray, function(j){
					selectHtml += '<option value="' + serverIdArray[j].split(":")[0] + '">' + serverIdArray[j].split(":")[1] + '</option>';
					checkboxHtml += '<a href="javascript:" class="a_as_checkbox look_box_corner" s_id="' + serverIdArray[j].split(":")[0] + '"><em>' + serverIdArray[j].split(":")[1] + '</em></a>';
				});
				$("#serverIdSelect").append(selectHtml).show().children("option[value='" + look.getHashParam("server_id") + "']").attr("selected", "selected");
				$("#serverIdCheckbox").append(checkboxHtml).show();
				publicInit.checkboxStyle("#serverIdCheckbox");
			}
		}
		//对比的appid和server_id
		if($("#contrastAppIdSelect").length != 0){this.AssayContrast();}
		typeof(callback) == "function" ? callback() : null;
	},
	AssayContrast : function(){
		look._APP_INFO_DIC_ARRAY.length == 1 ? $("#contrastAppIdSelect").empty() : $("#contrastAppIdSelect").children().first().nextAll().remove();
		$.map(look._APP_INFO_DIC_ARRAY, function(n){
			$("#contrastAppIdSelect").append('<option value="' + n[0] + '" s_id="' + n[2] + '">' + n[1] + '</option>');
		});
		//[事件]
		$("#contrastAppIdSelect").bind("change", function(){
			selectChangeFn($(this).val());
		});
		
		function selectChangeFn(appId){
			var serverId = $("#contrastAppIdSelect option:selected").attr("s_id"),
				selectHtml = "", serverIdArray = new Array();
			$("#contrastServerIdSelect").hide().children().remove();
			if(serverId){
				serverIdArray = serverId.split(",");
				$.each(serverIdArray, function(j){
					selectHtml += '<option value="' + serverIdArray[j].split(":")[0] + '">' + serverIdArray[j].split(":")[1] + '</option>';
				});
				$("#contrastServerIdSelect").append(selectHtml).show();
			}
		}
	},
	AssayGame : function(){
		var appid = look.getHashParam("appid"), serverId = new Array(), selectHtml = "";
		if(appid){
			$.map(look._APP_INFO_DIC_ARRAY, function(n){
				if(n[0] == appid){serverId = n[2];}
			});
			serverId.length == 1 ? $("#localeIdSelect").empty() : $("#localeIdSelect").children().first().nextAll().remove();
			if(serverId.length != 0){
				$.each(serverId, function(j){
					selectHtml += '<option value="' + serverId[j].split(":")[0] + '">' +serverId[j].split(":")[1] + '</option>';
				});
				$("#localeIdSelect").append(selectHtml).children("option[value='" + $.cookie("server_" + appid) + "']").attr("selected", "selected");
			}
		}
	}
}

//*************************************
//* 客服系统 -> 客服反馈
//* 获取“代理商名称字典”callback
//*************************************
var getAgentDictionaryCallback = {
	Convert: function(back){
		if (back.code == 0) {
			if (back.data != "") {
				look._AGENT_DIC_ARRAY.length = 0;
				$.each(back.data, function(i, list){
					look._AGENT_DIC_ARRAY.push(new Array(list.key, list.value));
				});
				getAgentDictionaryCallback.Assay();
			} else {
				look.showInfo.error(back.code + look._I18N_DATA.$430/**：代理商名称字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay: function(){
		$("#agentSelect").children().first().nextAll().remove();
		$.map(look._AGENT_DIC_ARRAY, function(n){
			$("#agentSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
		});
		$("#agentSelect").children("option[value='" + look.getHashParam("agent") + "']").attr("selected", "selected");
	}
}

//*************************************
//* 游戏管理系统 -> 聊天室管理 -> 实时监测
//* 获取“聊天室url”callback
//*************************************
var getWebChatUrlCallback = {
	Convert: function(back){
		if (back.code == 0) {
			if (back.data != "") {
				look._WEB_CHAT_WEBSOCKET_URL.push(new Array(back.data.appid + back.data.serverId, back.data.url));
			} else {
				look.showInfo.error(back.code + look._I18N_DATA.$586/**：聊天室地址为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Match: function(app){
		var url = null;
		for(var i = 0; i < look._WEB_CHAT_WEBSOCKET_URL.length; i++){
			var n = look._WEB_CHAT_WEBSOCKET_URL[i];
			if(n[0] == app){
				url = n[1];break;
			}
		}
		return url;
	}
}

/*** 公共 Callback END ***/

/*** plant_account Callback START ***/

//*************************************
//* 平台帐号管理系统 -> 平台帐号管理
//* 获取“用户信息”列表callback
//*************************************
var searchPlantUserCallback = function(back){
	var  plantAccountManageList = $("#plantAccountManageList"), envelopDevicePanel = $("#envelopDevicePanel");
	if (back.code == 0) {
		plantAccountManageList.empty();
		envelopDevicePanel.empty();
		if(back.data.users){
			var userStatus = "", deviceStatus = "", userNameHtml = "", emailHtml = "", nickNameHtml = "";
			envelopDevicePanel.append('<span class="cell">' + look._I18N_DATA.$30/**筛选结果：**/ + '<b class="color_yellow">' + back.data.totalCount + '</b>' + look._I18N_DATA.$33/**条**/ + '</span>').fadeIn();
			$.each(back.data.users, function(i, list){
				var banSubsetHtml = "", userStatusHtml = "", state = list.state;
				if(state == 0){
					banSubsetHtml = '<a href="javascript:" class="a_as_button a_as_red ban_account_subset" device_status="' + state + '" ban_type="user">' + look._I18N_DATA.$618/**封帐号**/ + '</a>';
					userStatusHtml = '<b class="color_green">' + look._I18N_DATA.$700/**解禁的**/ + '</b>';
				}else if(state == 1 || state == 2){
					banSubsetHtml = '<a href="javascript:" class="a_as_button a_as_green ban_account_subset" device_status="' + state + '" ban_type="user">' + look._I18N_DATA.$619/**解封**/ + '</a>';
					if(state == 1){
						userStatusHtml = '<b class="color_red">' + look._I18N_DATA.$701/**永久封禁**/ + '</b>';
					}else if(state == 2){
						userStatusHtml = '<b class="color_yellow">' + look._I18N_DATA.$702/**封禁的**/ + '</b>';
					}
				}
				userNameHtml = publicInit.authenCheck(look._AUTHEN.uc, 3) ? '<div class="icon_subset_cell">' + look.encodeHtml(list.userName) + '<a href="javascript:" class="a_as_icon modify_username_subset" mt="username"><tt class="icon edit_icon"></tt></a></span>' : look.encodeHtml(list.userName);
				emailHtml = publicInit.authenCheck(look._AUTHEN.uc, 4) ? '<div class="icon_subset_cell">' + (list.email ? list.email : 'N/A') + '<a href="javascript:" class="a_as_icon modify_email_subset" mt="email"><tt class="icon edit_icon"></tt></a></span>' : (list.email ? list.email : 'N/A');
				nickNameHtml = publicInit.authenCheck(look._AUTHEN.uc, 10) ? '<div class="icon_subset_cell">' + (list.nickName ? list.nickName : 'N/A') + '<a href="javascript:" class="a_as_icon modify_nickname_subset" mt="nickname"><tt class="icon edit_icon"></tt></a></span>' : (list.nickName ? list.nickName : 'N/A'); 
				plantAccountManageList.append(
					'<tr uid="' + list.uid + '">' +
					'	<td>' + list.uid + '</td>' +
					'	<td>' + userNameHtml + '</td>' +
					'	<td>' + emailHtml + '</td>' +
					'	<td>' + nickNameHtml + '</td>' +
					'	<td>' + list.userTypeName + '</td>' +
					'	<td>' + list.updateTime + '</td>' +
					'	<td>' + list.appCreateTime + '</td>' +
					'	<td>' + list.deviceId + '</td>' +
					'	<td>' + list.mac + '</td>' +
					'	<td>' + (list.lastLoginMac ? list.lastLoginMac : "N/A") + '</td>' +
					'	<td>' + userStatusHtml + '</td>' +
					'	<td>' + (publicInit.authenCheck(look._AUTHEN.uc, 5) ? '<a href="javascript:" class="a_as_button a_as_gray reset_password_subset">' + look._I18N_DATA.$621/**重置密码**/ + '</a>　' : '') + (publicInit.authenCheck(look._AUTHEN.uc, 7) ? banSubsetHtml : '') + '</td>' +
					'</tr>'
				);
				if(look.getHashParam("search_type") == 5){deviceStatus = list.deviceState;}
			});
			if(look.getHashParam("search_type") == 5){
				var banSubsetHtml = "", deviceStatusHtml = "";
				if (deviceStatus == 0) {
					deviceStatusHtml = '<b class="color_green">' + look._I18N_DATA.$700/**解禁的**/ + '</b>';
					banSubsetHtml = '<a href="javascript:" class="a_as_button a_as_red right" id="envelopDeviceSubset" device_status="' + deviceStatus + '" ban_type="device">' + look._I18N_DATA.$648/**设备封停功能**/ + '</a>';
				}else{
					if(deviceStatus == 1){
						deviceStatusHtml = '<b class="color_red">' + look._I18N_DATA.$701/**永久封禁**/ + '</b>';
					}else if(deviceStatus == 2){
						deviceStatusHtml = '<b class="color_yellow">' + look._I18N_DATA.$702/**封禁的**/ + '</b>';
					}
					banSubsetHtml = '<a href="javascript:" class="a_as_button a_as_green right" id="envelopDeviceSubset" device_status="' + deviceStatus + '" ban_type="device">' + look._I18N_DATA.$649/**设备解封功能**/ + '</a>';
				}
				envelopDevicePanel.append(
					(publicInit.authenCheck(look._AUTHEN.uc, 9) ? banSubsetHtml : '') + '<span class="right cell look_hidden">' + look._I18N_DATA.$87/**mac地址：**/ + '<tt>' + look.getHashParam("search_word") + '</tt>　' + look._I18N_DATA.$88/**设备状态：**/ + deviceStatusHtml + '</span>'
				).children().fadeIn();
			}
			publicInit.tabelStyle();
			function getPoperRequest(obj, left, url, callback){
				var offLeft = obj.offset().left - left,
					offTop = obj.offset().top + 20;
				$.get(url, function(text){
					$.lookPopDiv({left: offLeft,top: offTop,contentHtml: text});
					eval(callback());
				});
			}
			function envelopEvent(status){
				var envelopDay = $.trim($("#envelopDay").val()),
					envelopReason = $.trim($("#envelopReason").val()),
					unEnvelopReason = $.trim($("#unEnvelopReason").val());
				if(status == 2){
					if(envelopDay == ""){look.showInfo.error(look._I18N_DATA.$438/**封停天数不能为空…**/);$("#envelopDay").focus();return false;}
					if(isNaN(envelopDay)){look.showInfo.error(look._I18N_DATA.$439/**封停天数应该是数字…**/);$("#envelopDay").focus();return false;}
				}
				if(envelopReason == ""){look.showInfo.error(look._I18N_DATA.$440/**封停or解封原因不能为空…**/);$("#envelopReason").focus();return false;}
				return true;
			}
			//[事件]重置密码
			$(".reset_password_subset").unbind("click").bind("click", function(){
				var $uid = $(this).parents("tr").attr("uid");
				look._GENERATE_PASSWORD ? look._GENERATE_PASSWORD = look.generateGuid().substring(0, 6) : Look.prototype._GENERATE_PASSWORD = look.generateGuid().substring(0, 6);
				var confirmResetCallback = function(){
					$("#newPassword").val(look._GENERATE_PASSWORD);
					$("#popResetPasswordSubset").bind("click", function(){
						look._GENERATE_PASSWORD = look.trimAll($("#newPassword").val());
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$66/**提醒**/,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$805/**确定要重置密码？**/ + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if(obj.hasClass("a_as_disabled")){return false;}
								obj.addClass("a_as_disabled");
								$.lookPop({
									type: 2,
									title: look._I18N_DATA.$703/**重要提醒**/,
									html:
										'<div style="width:500px;">' +
										'	<div class="pop_content_word">' +
										'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$806/**重置密码操作不可逆，继续吗？**/ + '</span>' +
										'	</div>' +
										'</div>',
									confirmCallback: function(obj){
										if(obj.hasClass("a_as_disabled")){return false;}
										if(look.getByteLen(look._GENERATE_PASSWORD) < 6){look.showInfo.error(look._I18N_DATA.$441/**密码长度不能小于6位**/);return false;}
										obj.addClass("a_as_disabled");
										plantAccountResetPasswordRequest(look.getHashParam("appid"), $uid, look._GENERATE_PASSWORD);
									}
								});
							}
						});
					});
				}
				getPoperRequest($(this), 165, "plant_account/reset_password_poper.html", confirmResetCallback);
			});
			//[事件]封帐号&设备封停
			$(".ban_account_subset, #envelopDeviceSubset").unbind("click").bind("click", function(){
				var appid = look.getHashParam("appid"),
					uid = $(this).parents("tr").attr("uid"),
					deviceStatus = $(this).attr("device_status"),
					offsetLeft = "";
					banType = $(this).attr("ban_type"),
					popBanAccountHtml = "";
				var banAccountCallback = function(){
					if(deviceStatus == 0){
						$(".ban_account_poper").show();
						popBanAccountHtml = look._I18N_DATA.$624/**封停**/;
					}else{
						$(".unban_account_poper").show();
						popBanAccountHtml = look._I18N_DATA.$619/**解封**/;
					}
					publicInit.inputTipStyle(".envelop_poper input.text", ".envelop_poper label tt");
					$(".envelop_poper input.text:visible").first().focus();
					$("#popBanAccountSubset, #popBanAccountForeverSubset, #popUnBanAccountSubset").bind("click", function(){
						var status = $(this).attr("st"),
							envelopDay = $.trim($("#envelopDay").val()),
							envelopReason = $.trim($("#envelopReason").val());
						if (envelopEvent(status)) {
							$.lookPop({
								type: 2,
								title: look._I18N_DATA.$66/**提醒**/,
								html:
									'<div style="width:500px;">' +
									'	<div class="pop_content_word">' +
									'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$807/**确定要{operate}该{object}？**/.replace(/{operate}/ig, popBanAccountHtml).replace(/{object}/ig, (banType == "device" ?  look._I18N_DATA.$705/**设备**/ : look._I18N_DATA.$706/**帐号**/)) + '</span>' +
									'	</div>' +
									'</div>',
								confirmCallback: function(obj){
									if(obj.hasClass("a_as_disabled")){return false;}
									obj.addClass("a_as_disabled").text(look._I18N_DATA.$707/**正在**/ + popBanAccountHtml + "…");
									banType == "device" ? plantAccountModifyDeviceStatusRequest(appid, look.getHashParam("search_word"), status, envelopDay, envelopReason) : plantAccountModifyUserStatusRequest(appid, uid, status, envelopDay, envelopReason);
								}
							});
						}
					});
				}
				banType == "device" ?  offsetLeft = 270 : offsetLeft = 315;
				getPoperRequest($(this), offsetLeft, "plant_account/envelop_poper.html", banAccountCallback);
			});
			//[事件]修改用户名&邮箱&昵称
			$(".modify_username_subset, .modify_email_subset, .modify_nickname_subset").unbind("click").bind("click", function(){
				var uid = $(this).parents('tr').attr("uid"),
					prevValue = $(this).parent().text(),
					modifyType = $(this).attr("mt"),
					sIndex = $(this).parents("td").index(),
					titleObj = $("#plantAccountManageList th").eq(sIndex);
				var confirmModifyCallback = function(){
					$(".pop_user_info_cell span.label[mt='" + modifyType + "']").show();
					$("#popUserInfoInput").focus();
					//[事件]修改
					$("#popModifySubset").bind("click", function(){
						var newValue = $.trim($("#popUserInfoInput").val());
						if(prevValue == newValue){look.showInfo.error(look._I18N_DATA.$444/**没有作任何修改…**/);return false;}
						if(newValue == ""){look.showInfo.error(titleObj.text() + " " + look._I18N_DATA.$442/**不能为空…**/);$("#popUserInfoInput").focus();return false;}
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$66/**提醒**/,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$808/**确定修改{word}？**/.replace(/{word}/ig, titleObj.text()) + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if(obj.hasClass("a_as_disabled")){return false;}
								look._TEMP = null;
								switch(modifyType){
									case "username" : plantAccountModifyUsernameRequest(look.getHashParam("appid"), uid, newValue);look._TEMP = newValue;
										break;
									case "email" : plantAccountModifyEmailRequest(look.getHashParam("appid"), uid, newValue);
										break;
									case "nickname" : plantAccountModifyNicknameRequest(look.getHashParam("appid"), uid, newValue);
										break;
								}
								obj.addClass("a_as_disabled");
							}
						});
					});
				}
				getPoperRequest($(this), 50, "plant_account/modify_user_info_poper.html", confirmModifyCallback);
				
			});
		}else{
			plantAccountManageList.append('<tr><td colspan="12">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
			envelopDevicePanel.hide();
		}
		setPager(".pager", look._PAGER_SIZE, location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		plantAccountManageList.append('<tr><td colspan="12">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		envelopDevicePanel.hide();
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 平台帐号管理系统 -> 平台帐号管理
//* “重置密码”callback
//*************************************
var plantAccountResetPasswordCallback = function(back){
	if(back.code == 0){
		$.lookPop({
			type: -1,
			title: look._I18N_DATA.$809/**重置密码成功**/,
			closeSubset: true,
			html:
				'<div style="width:500px;">' +
				'	<div class="pop_content_word">' +
				'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$89/**新密码是：**/ + look._GENERATE_PASSWORD + '</span>' +
				'	</div>' +
				'</div>',
			confirmCallback: function(obj){
				if(obj.hasClass("a_as_disabled")){return false;}
				obj.addClass("a_as_disabled");
				gameHelpDelGameDetailRequest(look.getHashParam("appid"), look.getHashParam("server_id"), file);
			}
		});
		$(".envelop_poper").parents(".look_pop_panel").remove();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 平台帐号管理系统 -> 平台帐号管理
//* 更改用户状态callback
//*************************************
var plantAccountModifyUserStatusCallback = function(back){
	if(back.code == 0){
		$.clearPop();$.clearPopDiv();
		look.showInfo.right(back.code + ":" + back.message);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var plantAccountModifyUserStatusComplete = function(){
	$(".pop_confirm_subset").removeClass("a_as_disabled").text(look._I18N_DATA.$600/**确定**/);
}

//*************************************
//* 平台帐号管理系统 -> 平台帐号管理
//* 更改设备状态callback
//*************************************
var plantAccountModifyDeviceStatusCallback = function(back){
	if(back.code == 0){
		$.clearPop();$.clearPopDiv();
		look.showInfo.right(back.code + ":" + back.message);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var plantAccountModifyDeviceStatusComplete = function(){
	$(".pop_confirm_subset").removeClass("a_as_disabled").text(look._I18N_DATA.$600/**确定**/);
}

//*************************************
//* 平台帐号管理系统 -> 平台帐号管理
//* 更改用户信息（邮箱&用户名&昵称）callback
//*************************************
var plantAccountModifyUserInfoCallback = function(back){
	if(back.code == 0){
		$.clearPop();$.clearPopDiv();
		look.showInfo.right(back.code + look._I18N_DATA.$445/**：修改用户信息成功！**/);
		location.hash = look.setParam([(look._TEMP != null ? new Array("search_word", look._TEMP) : "")], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** plant_account Callback END ***/

/*** recharge Callback END ***/

//*************************************
//* 充值消费管理系统 -> 帐号余额管理
//* 获取用户“帐号余额”callback
//*************************************
var getUserBalanceCallback = function(back){
	if (back.code == 0) {
		$("#balanceManageList").empty();
		if (back.data.items) {
			$.each(back.data.items, function(i, list){
				$("#balanceManageList").append(
					'<tr uid="' + list.uid + '">' +
					'	<td>' + list.uid + '</td>' +
					'	<td>' + look.encodeHtml(list.userName) + '</td>' +
					'	<td>' + list.email + '</td>' +
					'	<td>' + list.bucksBuy + '</td>' +
					'	<td>' + list.bucksGame + '</td>' +
					'	<td>' + (publicInit.authenCheck(look._AUTHEN.payment, 3) ? '<a href="javascript:" class="a_as_button a_as_green modify_balance_subset">' + look._I18N_DATA.$625/**补金币**/ + '</a>' : 'N/A') + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left - 240,
					offTop = obj.offset().top + 20;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						contentHtml: text
					});
					eval(callback());
				});
			}
			//[事件]修改金币
			$(".modify_balance_subset").unbind("click").bind("click", function(){
				var uid = $(this).parents("tr").attr("uid");
				var confirmModifyCallback = function(){
					$("#bucksBuyInput").focus();
					$("#popModifyBalanceSubset").bind("click", function(){
						var bucksBuy = $.trim($("#bucksBuyInput").val()),
							bucksGive = $.trim($("#bucksGameInput").val()),
							description = $.trim($("#descriptionTextarea").val());
						if(bucksBuy == "" && bucksGive == ""){look.showInfo.error(look._I18N_DATA.$446/**“用户购买金币”和“游戏赠送金币”必须要填一项**/);return false;}
						if(isNaN(bucksBuy) || isNaN(bucksGive)){look.showInfo.error(look._I18N_DATA.$447/**“用户购买金币”和“游戏赠送金币”必须要是数字**/);return false;}
						if(description == ""){look.showInfo.error(look._I18N_DATA.$448/**“修改原因”不能为空**/);return false;}
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$66/**提醒**/,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$810/**确定要增/减金币？**/ + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								$.lookPop({
									type: 2,
									title: look._I18N_DATA.$703/**重要提醒**/,
									html:
										'<div style="width:500px;">' +
										'	<div class="pop_content_word">' +
										'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$811/**增/减金币操作影响较大，继续吗？**/ + '</span>' +
										'	</div>' +
										'</div>',
									confirmCallback: function(obj){
										if(obj.hasClass("a_as_disabled")){return false;}
										obj.addClass("a_as_disabled");
										modifyUserBalanceRequest(look.getHashParam("appid"), look.getHashParam("server_id"), uid, bucksBuy, bucksGive, description);
									}
								});
							}
						});
					});
				}
				getPoperRequest($(this), "recharge/modify_balance_poper.html", confirmModifyCallback);
			});
		}else {
			$("#balanceManageList").append('<tr><td colspan="6">' + look._I18N_DATA.$304/**“没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
		setPager(".pager", look._PAGER_SIZE, location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 帐号余额管理
//* 更新用户金币callback
//*************************************
var modifyUserBalanceCallback = function(back){
	if(back.code == 0){
		$.clearPop();$.clearPopDiv();
		look.showInfo.right(back.code + look._I18N_DATA.$449/**：金币修改成功！**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 帐号余额管理
//* 批量补金币callback
//*************************************
var batchAddBucksCallback = function(back){
	if(back.code == 0){
		$.clearPop();$.clearPopDiv();
		look.showInfo.right(back.code + look._I18N_DATA.$587/**：批量补金币成功！**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 充值消费记录
//* 获取“记录”列表callback
//*************************************
var getRechargeConsumeRecordCallback = {
	Convert : function(back, operateHtml){
		if (back.code == 0) {
			$("#rechargeConsumeRecordList").empty();
			if (back.data.items) {
				$.each(back.data.items, function(i, list){
					$("#rechargeConsumeRecordList").append(
						'<tr uid="' + list.uid + '">' +
						'	<td>' + list.uid + '</td>' +
						'	<td>' + look.encodeHtml(list.userName) + '</td>' +
						'	<td>' + list.userType + '</td>' +
						'	<td>' + list.updateTime + '</td>' +
						'	<td>' + list.email + '</td>' +
						'	<td>' + list.userTypeName + '</td>' +
						'	<td>' + list.deviceId + '</td>' +
						'	<td>' + list.mac + '</td>' +
						'	<td>' + operateHtml + '</td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				//[事件]金币/购买记录
				$(".balance_record_subset, .buy_record_subset, .consume_record_poper").bind("click", function(){
					var uid = $(this).parents("tr").attr("uid"),
						serverId = $("#serverIdSelect").val(),
						poper = $(this).attr("poper");
					if(serverId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
					initLoader.balanceRecordPoperLoader(uid, poper, serverId);
				});
			}else {
				$("#rechargeConsumeRecordList").append('<tr><td colspan="9">' + look._I18N_DATA.$304/**“没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Recharge : function(back){
		operateHtml = (publicInit.authenCheck(look._AUTHEN.payment, 8) ? '<a href="javascript:" class="a_as_button a_as_blue balance_record_subset" poper="balance">' + look._I18N_DATA.$708/**金币记录**/ + '</a>　' : '') + (publicInit.authenCheck(look._AUTHEN.payment, 10) ? '<a href="javascript:" class="a_as_button a_as_green buy_record_subset" poper="buy">' + look._I18N_DATA.$709/**购买记录**/ + '</a>' : '');
		getRechargeConsumeRecordCallback.Convert(back, operateHtml);
	},
	Consume : function(back){
		operateHtml = publicInit.authenCheck(look._AUTHEN.payment, 12) ? '<a href="javascript:" class="a_as_button a_as_green consume_record_poper" poper="consume">' + look._I18N_DATA.$710/**消费记录**/ + '</a>' : 'N/A';
		getRechargeConsumeRecordCallback.Convert(back, operateHtml);
	}
}

//*************************************
//* 充值消费管理系统 -> 充值消费记录
//* 查询金币历史记录callback
//*************************************
var getBalanceRecordCallback = function(back){
	if (back.code == 0) {
		$("#balanceRecordList").empty();
		if (back.data.items) {
			$.each(back.data.items, function(i, list){
				$("#balanceRecordList").append(
					'<tr hid="' + list.id + '">' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.type + '</td>' +
					'	<td b_type="' + list.type + '">' + (list.typeName ? list.typeName : look._I18N_DATA.$711/**解析ing**/) + '</td>' +
					'	<td>' + list.createTime + '</td>' +
					'	<td>' + list.bucksBuy + '</td>' +
					'	<td>' + list.bucksGame + '</td>' +
					'	<td>' + list.bucksBuyOld + '</td>' +
					'	<td>' + list.bucksBuyNew + '</td>' +
					'	<td>' + list.bucksGameOld + '</td>' +
					'	<td>' + list.bucksGameNew + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle(false);
			
			switch(look.getHashParam("appid")){
				case "10024" :	look._FLIGHT_BUCK_DIC_ARRAY.length == 0 ? flightGetDictionaryRequest(4) : getBuckRecordAssay(look._FLIGHT_BUCK_DIC_ARRAY);
					break;
				case "20048" :	look._SAIL_BUCK_DIC_ARRAY.length == 0 ? sailGetDictionaryRequest("buck") : getBuckRecordAssay(look._SAIL_BUCK_DIC_ARRAY);
					break;
			}
			
			var pageCallback = function(page){
				getBalanceRecordRequest(look.getHashParam("appid"), $("#serverIdSelect").val(), $("#balanceRecordPoper").attr("uid"), $("#dataStart").val(), $("#dataEnd").val(), page);
			}
			setJsPager(".pager", back.data.page, look._PAGER_SIZE/2, back.data.totalCount, pageCallback);
		}else {
			$("#balanceRecordList").append('<tr><td colspan="10">' + look._I18N_DATA.$304/**“没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
//支付类型字典替换
var getBuckRecordAssay = function(dic){
	$.map(dic, function(n){
		$("#balanceRecordList tr").each(function(i){
			var typeObj = $(this).children("td").eq(2);
			if(typeObj.attr("b_type") == n[0]){
				typeObj.text(n[1]);
			}
		});
	});
}

//*************************************
//* 充值消费管理系统 -> 充值消费记录
//* 查询购买历史记录callback
//*************************************
var getBuyRecordCallback = function(back){
	if (back.code == 0) {
		$("#buyRecordList").empty();
		if (back.data.items) {
			$.each(back.data.items, function(i, list){
				$("#buyRecordList").append(
					'<tr hid="' + list.id + '">' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.payid + '</td>' +
					'	<td>' + list.createTime + '</td>' +
					'	<td>' + list.productId + '</td>' +
					'	<td>' + list.stateName + '</td>' +
					'	<td>' + list.channelName + '</td>' +
					'	<td>' + list.mac + '</td>' +
					'	<td>' + list.deviceInfo + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle(false);
			var pageCallback = function(page){
				getBuyRecordRequest(look.getHashParam("appid"), $("#buyRecordPoper").attr("uid"), $("#dataStart").val(), $("#dataEnd").val(), page);
			}
			setJsPager(".pager", back.data.page, look._PAGER_SIZE/2, back.data.totalCount, pageCallback);
		}else {
			$("#buyRecordList").append('<tr><td colspan="8">' + look._I18N_DATA.$304/**“没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 充值消费记录
//* 查询消费历史记录callback
//*************************************
var getConsumeRecordCallback = function(back){
	if (back.code == 0) {
		$("#consumeRecordList").empty();
		if (back.data.items) {
			$.each(back.data.items, function(i, list){
				$("#consumeRecordList").append(
					'<tr hid="' + list.id + '">' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.createTime + '</td>' +
					'	<td>' + list.stateName + '</td>' +
					'	<td>' + list.bucks + '</td>' +
					'	<td c_type="' + list.type + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
					'	<td>' + list.consumeCount + '</td>' +
					'	<td>' + list.bucksBuyOld + '</td>' +
					'	<td>' + list.bucksBuyNew + '</td>' +
					'	<td>' + list.bucksGameOld + '</td>' +
					'	<td>' + list.bucksGameNew + '</td>' +
					'	<td>' + list.mac + '</td>' +
					'	<td>' + list.deviceInfo + '</td>' +
					'	<td>' + list.ip + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle(false);
			
			switch(look.getHashParam("appid")){
				case "10024" :	look._FLIGHT_CONSUME_DIC_ARRAY.length == 0 ? flightGetDictionaryRequest(3) : getConsumeRecordAssay(look._FLIGHT_CONSUME_DIC_ARRAY);
					break;
				case "20048" :	look._SAIL_CONSUME_DIC_ARRAY.length == 0 ? sailGetDictionaryRequest("consume") : getConsumeRecordAssay(look._SAIL_CONSUME_DIC_ARRAY);
					break;
				case "20066" :
					if(look._EMPIRE_CONSUME_DIC_ARRAY == undefined){Look.prototype._EMPIRE_CONSUME_DIC_ARRAY = new Array();}
					look._EMPIRE_CONSUME_DIC_ARRAY.length == 0 ? empireGetDictionaryRequest("consume") : getConsumeRecordAssay(look._EMPIRE_CONSUME_DIC_ARRAY);
					break;
			}
			
			var pageCallback = function(page){
				getConsumeRecordRequest(look.getHashParam("appid"), $("#serverIdSelect").val(), $("#consumeRecordPoper").attr("uid"), $("#dataStart").val(), $("#dataEnd").val(), page);
			}
			setJsPager(".pager", back.data.page, look._PAGER_SIZE/2, back.data.totalCount, pageCallback);
		}else {
			$("#consumeRecordList").append('<tr><td colspan="13">' + look._I18N_DATA.$304/**“没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
//消费类型字典替换
var getConsumeRecordAssay = function(dic){
	$.map(dic, function(n){
		$("#consumeRecordList tr").each(function(i){
			var typeObj = $(this).children("td").eq(4);
			if(typeObj.attr("c_type") == n[0]){
				typeObj.text(n[1]);
			}
		});
	});
}

//*************************************
//* 充值消费管理系统 -> 黑卡预警记录
//* 获取设备支付次数列表callback
//*************************************
var devicePaymentRecordCallback = function(back){
	var devicePaymentRecordList = $("#devicePaymentRecordList");
	$("#resultLoader").hide();
	devicePaymentRecordList.empty();
	$("#resultCount").text((back.data.totalCount != undefined ? back.data.totalCount : "-"));
	if (back.code == 0) {
		if (back.data.items) {
			var state = "", deviceState = "", stateHtml = "", subsetHtml = "", deviceStatusHtml = "";
			$.each(back.data.items, function(i, list){
				state = list.state;
				switch(state){
					case 0 : stateHtml = '<b class="color_gray">' + look._I18N_DATA.$1117/**未处理**/ + '</b>'; subsetHtml = (publicInit.authenCheck(look._AUTHEN.payment, 16) ? '<a href="javascript:" class="a_as_button dealed_subset" st="1" word="' + look._I18N_DATA.$1119/**处理**/ + '">' + look._I18N_DATA.$1118/**已处理**/ + '</a>　<a href="javascript:" class="a_as_button a_as_red ignore_subset" st="2" word="' + look._I18N_DATA.$606/**忽略**/ + '">' + look._I18N_DATA.$606/**忽略**/ + '</a>' : 'N/A');
						break;
					case 1 : stateHtml = '<b class="color_green">' + look._I18N_DATA.$1118/**已处理**/ + '</b>'; subsetHtml = look._I18N_DATA.$2075/**结果：**/ + list.message;
						break;
					case 2 : stateHtml = '<b class="color_red">' + look._I18N_DATA.$606/**忽略**/ + '</b>'; subsetHtml = look._I18N_DATA.$77/**原因：**/ + list.message;
						break;
					default : stateHtml = '<b class="color_yellow">' + look._I18N_DATA.$10/**未知**/ + '</b>'; subsetHtml = '/';
						break;
				}
				deviceState = list.deviceState;
				switch (deviceState) {
					case 0 : deviceStatusHtml = '<b class="color_green">' + look._I18N_DATA.$700/**解禁的**/ + '</b>';
						break;
					case 1 : deviceStatusHtml = '<b class="color_red">' + look._I18N_DATA.$701/**永久封禁**/ + '</b>';
						break;
					case 2 : deviceStatusHtml = '<b class="color_yellow">' + look._I18N_DATA.$702/**封禁的**/ + '</b>';
						break;
					default : deviceStatusHtml = '<b class="color_gray">' + look._I18N_DATA.$10/**未知**/ + '</b>';
						break;
				}
				devicePaymentRecordList.append(
					'<tr id="' + list.id + '">' +
					'	<td>' + (i + 1 + (back.data.page - 1) * look._PAGER_SIZE) + '</td>' +
					'	<td>' + (list.mac ? '<a href="' + look.setParam([["mac", list.mac]], location.hash).split("&page")[0] + '" class="blue">' + list.mac + '</a>' : 'N/A') + '</td>' +
					'	<td>' + (list.deviceId = "" ? "N/A" : list.deviceId) + '</td>' +
					'	<td>' + look._I18N_DATA.$5105/**{day}天之内为{count}个账号进行充值**/.replace(/{day}/ig, list.day).replace(/{count}/ig, list.count) + '</td>' +
					'	<td d_state="' + deviceState + '">' + deviceStatusHtml + '</td>' +
					'	<td>' + list.createTime + '</td>' +
					'	<td>' + list.updateTime + '</td>' +
					'	<td>' + stateHtml + '</td>' +
					'	<td>' + subsetHtml + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left - 190,
					offTop = obj.offset().top + 20;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "device_payment_poper",
						contentHtml: text
					});
					eval(callback());
				});
			}
			//[事件]处理&忽略
			$(".ignore_subset, .dealed_subset").unbind("click").bind("click", function(){
				var id = $(this).parents("tr").attr("id")
					state = $(this).attr("st"),
					word = $(this).attr("word");
				var confirmChangeCallback = function(){
					publicInit.inputTipStyle(".envelop_poper input.text", ".envelop_poper label tt");
					$("#messageInput").focus();
					$("#popChangeDevicePaymentSubset").bind("click", function(){
						var message = $.trim($("#messageInput").val());
						if(message == "" && state == "2"){
							look.showInfo.error(look._I18N_DATA.$588/**忽略原因不能为空**/);$("#messageInput").focus();return false;
						}
						if(message == "" && state == "1"){
							look.showInfo.error(look._I18N_DATA.$589/**处理结果不能为空**/);$("#messageInput").focus();return false;
						}
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$66/**提醒**/,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$863/**确定要{word}该记录？**/.replace(/{word}/ig, word) + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if(obj.hasClass("a_as_disabled")){return false;}
								obj.addClass("a_as_disabled");
								changeDevicePaymentStateRequest(id, state, message);
							}
						});
					});
				}
				getPoperRequest($(this), "recharge/ignore_device_payment_poper.html", confirmChangeCallback);
			});
		}else {
			devicePaymentRecordList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
		setPager(".pager", look._PAGER_SIZE, location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		devicePaymentRecordList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 黑卡预警记录
//* 修改设备支付状态callback
//*************************************
var changeDevicePaymentStateCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$590/**：操作成功！**/);
		$.clearPop();$.clearPopDiv({id: ".device_payment_poper"});
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 未完成支付记录
//* 获取支付渠道字典callback
//*************************************
var getPayStoreTypeDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				Look.prototype._PAY_STROE_TYPE_DIC_ARRAY = new Array();
				$.each(back.data.items, function(i, list){
					look._PAY_STROE_TYPE_DIC_ARRAY.push(new Array(list.id, list.name));
				});
			}else {
				look.showInfo.error(back.code + look._I18N_DATA.$591/**：支付渠道字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 充值消费管理系统 -> 未完成支付记录
//* 获取未完成支付记录callback
//*************************************
var unfinishPaymentRecordCallback = function(back){
	var unfinishPaymentRecordList = $("#unfinishPaymentRecordList");
	$("#resultLoader").hide();
	unfinishPaymentRecordList.empty();
	$("#resultCount").text((back.data.totalCount != undefined ? back.data.totalCount : "-"));
	if (back.code == 0) {
		if (back.data.items) {
			var state = "", stateHtml = "", subsetStyle = " a_as_disabled";
			$.each(back.data.items, function(i, list){
				state = list.state;
				switch(state){
					case 0 : stateHtml = '<b class="color_gray">' + look._I18N_DATA.$1117/**未处理**/ + '</b>';subsetStyle = "";
						break;
					case 1 : stateHtml = '<div class="message_subset" st="<b>' + look._I18N_DATA.$77/**原因：**/ + list.message + '</b>"><b class="color_green">' + look._I18N_DATA.$1118/**已处理**/ + '</b> <b>?</b></div>';
						break;
					case 2 : stateHtml = '<div class="message_subset" st="<b>' + look._I18N_DATA.$77/**原因：**/ + list.message + '</b>"><b class="color_red">' + look._I18N_DATA.$606/**忽略**/ + '</b> <b>?</b></div>';
						break;
					default : stateHtml = '<b class="color_yellow">' + look._I18N_DATA.$10/**未知**/ + '</b>';
						break;
				}
				unfinishPaymentRecordList.append(
					'<tr id="' + list.id + '">' +
					'	<td>' + (i + 1 + (back.data.page - 1) * look._PAGER_SIZE) + '</td>' +
					'	<td>' + list.createTime + '</td>' +
					'	<td>' + list.deviceId + '</td>' +
					'	<td><a href="' + look.setParam([["mac", list.mac]], location.hash).split("&page")[0] + '" class="blue">' + list.mac + '</a></td>' +
					'	<td>' + list.osType + " " +  list.osVersion + '</td>' +
					'	<td>' + list.locale + "-" +list.localeZone +'</td>' +
					'	<td class="pay_type" pay_id="' + list.payType + '">' + list.payType + '</td>' +
					'	<td>' + stateHtml + '</td>' +
					'	<td>' + (publicInit.authenCheck(look._AUTHEN.payment, 20) ? '<a href="javascript:" class="a_as_button dealed_subset' + subsetStyle + '" st="1" word="' + look._I18N_DATA.$1119/**处理**/ + '">' + look._I18N_DATA.$1118/**已处理**/ + '</a>　' : '') + (publicInit.authenCheck(look._AUTHEN.payment, 21) ? '<a href="javascript:" class="a_as_button a_as_red ignore_subset' + subsetStyle + '" st="2" word="' + look._I18N_DATA.$606/**忽略**/ + '">' + look._I18N_DATA.$606/**忽略**/ + '</a>' : '') + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			getPayStoreTypeDictionaryAssay("#unfinishPaymentRecordList");
			
			$(".message_subset").floater({
				closer:false,
				backgroundColor:"#333",
				borderColor:'#333',
				fontColor:'#fff',
				padding:[4,6,4,6]
			});
			
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left - 190,
					offTop = obj.offset().top + 20;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "unfinish_payment_poper",
						contentHtml: text
					});
					eval(callback());
				});
			}
			//[事件]处理&忽略
			$(".ignore_subset, .dealed_subset").unbind("click").bind("click", function(){
				var id = $(this).parents("tr").attr("id")
					state = $(this).attr("st"),
					word = $(this).attr("word");
				var confirmChangeCallback = function(){
					publicInit.inputTipStyle(".envelop_poper input.text", ".envelop_poper label tt");
					$("#messageInput").focus();
					$("#popChangeDevicePaymentSubset").bind("click", function(){
						var message = $.trim($("#messageInput").val());
						if(message == ""){look.showInfo.error(look._I18N_DATA.$864/**{word}原因不能为空**/.replace(/{word}/ig, word));$("#messageInput").focus();return false;}
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$66/**提醒**/,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$863/**确定要{word}该记录？**/.replace(/{word}/ig, word) + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if(obj.hasClass("a_as_disabled")){return false;}
								obj.addClass("a_as_disabled");
								if(state == "1"){//处理
									dealedUnfinishPaymentRequest(id, message);
								}else if(state == "2"){//忽略
									ignoreUnfinishPaymentRequest(id, message);
								}
							}
						});
					});
				}
				getPoperRequest($(this), "recharge/ignore_device_payment_poper.html", confirmChangeCallback);
			});
		}else {
			unfinishPaymentRecordList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
		setPager(".pager", look._PAGER_SIZE, location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		unfinishPaymentRecordList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}
//支付渠道字典
var getPayStoreTypeDictionaryAssay = function(element){
	if(look._PAY_STROE_TYPE_DIC_ARRAY && look._PAY_STROE_TYPE_DIC_ARRAY != 0){
		$(element).each(function(i){
			var element = $(this).find(".pay_type"),
				id = element.attr("pay_id");
			$.map(look._PAY_STROE_TYPE_DIC_ARRAY, function(n){
				if(n[0] == id){
					element.text(n[1]);
				}
			});
		});
	}
}

//*************************************
//* 充值消费管理系统 -> 未完成支付记录
//* 处理&忽略未完成支付记录callback
//*************************************
var dealedIgnoreUnfinishPaymentCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$590/**：操作成功！**/);
		$.clearPop();$.clearPopDiv({id: ".unfinish_payment_poper"});
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 成功支付记录
//* 获取成功支付记录callback
//*************************************
var successPaymentRecordCallback = function(back){
	var successPaymentRecordList = $("#successPaymentRecordList");
	$("#resultLoader").hide();
	successPaymentRecordList.empty();
	$("#resultCount").text((back.data.totalCount != undefined ? back.data.totalCount : "-"));
	if (back.code == 0) {
		if (back.data.items) {
			$.each(back.data.items, function(i, list){
				successPaymentRecordList.append(
					'<tr id="' + list.id + '">' +
					'	<td>' + (i + 1 + (back.data.page - 1) * look._PAGER_SIZE) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.uid + '</td>' +
					'	<td>' + list.payType + '</td>' +
					'	<td>' + list.payGroup + '</td>' +
					'	<td>' + list.productId + '</td>' +
					'	<td>' + list.bucks + '</td>' +
					'	<td>' + list.statPrice + '</td>' +
					'	<td>' + list.usdPrice + '</td>' +
					'	<td>' + list.mac + '</td>' +
					'	<td>' + list.deviceType + '</td>' +
					'	<td>' + list.osType + '</td>' +
					'	<td>' + list.osVersion + '</td>' +
					'	<td>' + list.locale + '</td>' +
					'	<td>' + list.createTime + '</td>' +
					'	<td>' + list.updateTime + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else {
			successPaymentRecordList.append('<tr><td colspan="16">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
		setPager(".pager", "100", location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		successPaymentRecordList.append('<tr><td colspan="16">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 客服加币记录
//* 获取客服加币记录列表callback
//*************************************
var getAddBucksHistoryCallback = function(back){
	var addBucksRecordList = $("#addBucksRecordList");
	$("#resultLoader").hide();
	addBucksRecordList.empty();
	$("#resultCount").text((back.data.totalCount ? back.data.totalCount : "-"));
	if (back.code == 0) {
		if (back.data.items) {
			$.each(back.data.items, function(i, list){
				addBucksRecordList.append(
					'<tr id="' + list.id + '">' +
					'	<td>' + (i + 1 + (back.data.page - 1) * look._PAGER_SIZE) + '</td>' +
					'	<td>' + list.bucksBuy + '</td>' +
					'	<td>' + list.bucksGame + '</td>' +
					'	<td>' + list.bucksBuyOld + '</td>' +
					'	<td>' + list.bucksGameOld + '</td>' +
					'	<td>' + list.bucksBuyNew + '</td>' +
					'	<td>' + list.bucksGameNew + '</td>' +
					'	<td>' + list.createTime + '</td>' +
					'	<td>' + list.uid + '</td>' +
					'	<td>' + list.operator + '</td>' +
					'	<td><div class="message_subset" st="' + list.description + '">' + (look.getByteLen(list.description) > 16 ? look.getByteVal(list.description, 16) + '..' : list.description) + '</div></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			$(".message_subset").floater({
				closer:false,
				backgroundColor:"#333",
				borderColor:'#333',
				fontColor:'#fff',
				padding:[4,6,4,6]
			});
		}else {
			addBucksRecordList.append('<tr><td colspan="11">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
		setPager(".pager", look._PAGER_SIZE, location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		addBucksRecordList.append('<tr><td colspan="11">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 充值消费管理系统 -> 批量加币记录
//* 获取记录列表callback
//*************************************
var getBatchAddBucksHistoryCallback = function(back){
	var batchAddBucksRecordList = $("#batchAddBucksRecordList");
	$("#resultLoader").hide();
	batchAddBucksRecordList.empty();
	if (back.code == 0) {
		$("#resultCount").text((back.data.totalCount ? back.data.totalCount : "-"));
		if (back.data.items && back.data.count != 0) {
			$.each(back.data.items, function(i, list){
				var state = list.state, stateHtml = "";
				switch(state){
					case 0 : stateHtml = look._I18N_DATA.$1120/**处理中**/;
					break;
					case 1 : stateHtml = '<b class="color_green">' + look._I18N_DATA.$1121/**成功**/ + '</b>';
					break;
					case 2 : stateHtml = '<b class="color_red">' + look._I18N_DATA.$1122/**失败**/ + '</b>';
					break;
					default : stateHtml = look._I18N_DATA.$10/**未知**/;
				}
				batchAddBucksRecordList.append(
					'<tr id="' + list.id + '">' +
					'	<td>' + (i + 1 + (back.data.page - 1) * look._PAGER_SIZE) + '</td>' +
					'	<td><a href="javascript:" class="a_as_button a_as_green detail_subset" data="' + list.datas + '" d_type="record">' + list.datas.split(",").length + '</a></td>' +
					'	<td>' + (list.fails ? '<a href="javascript:" class="a_as_button a_as_red detail_subset" data="' + list.fails + '" d_type="fail">' + list.fails.split(";").length + '</a>' : '0') + '</td>' +
					'	<td>' + stateHtml + '</td>' +
					'	<td>' + list.opUser + '</td>' +
					'	<td><div class="message_subset" st="' + list.message + '">' + (look.getByteLen(list.message) > 16 ? look.getByteVal(list.message, 16) + '..' : list.message) + '</div></td>' +
					'	<td>' + list.createTime + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			$(".message_subset").floater({
				closer:false,
				backgroundColor:"#333",
				borderColor:'#333',
				fontColor:'#fff',
				padding:[4,6,4,6]
			});
			//[事件]查看详情记录
			$(".detail_subset").unbind("click").bind("click", function(){
				var data =  $(this).attr("data"),
					dataType = $(this).attr("d_type"),
					popTitle = "", dataHtml = "";
				switch(dataType){
					case "record" : popTitle = look._I18N_DATA.$1123/**加币记录**/;
					var dataArray = data.split(",");
					$.each(dataArray, function(i, list){
						dataHtml += '<span class="look_cell"><tt>' +  list.split(" ")[0] + '</tt> [<b class="color_yellow">' +  list.split(" ")[1] + '</b>]</span>';
					});
					break;
					case "fail" : popTitle = look._I18N_DATA.$1124/**失败记录**/;
					var dataArray = data.split(";");
					$.each(dataArray, function(i, list){
						dataHtml += '<span class="look_cell"><tt>' +  list.split(";")[0].split(" ")[0] + '</tt> [<b class="color_yellow">' +  list.split(";")[0].split(" ")[1].split(":")[0] + '</b>] “<tt class="color_gray">' +  list.split(";")[0].split(" ")[1].split(":")[1] + '</tt>”</span>';
					});
					break;
				}
				$.lookPop({
					type: -1,
					title: popTitle,
					html: '<div class="pop_content_text pop_cell">' + dataHtml + '</div>'
				});
			});
		}else {
			batchAddBucksRecordList.append('<tr><td colspan="11">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
		setPager(".pager", look._PAGER_SIZE, location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		batchAddBucksRecordList.append('<tr><td colspan="11">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** recharge Callback END ***/

/*** service Callback START ***/

//*************************************
//* 客服系统 -> 找回帐号反馈
//* 找回帐号反馈callback
//*************************************
var retrieveAccountFeedbackCallback = function(back){
	var ifReplayHtml = "", replayHtml = "";
	$("#resultLoader").hide();
	$(".retrieve_panel").remove();
	if(back.code == 0){
		$("#resultCount").text(back.data.totalCount);
		if(back.data.cm.length != 0){
			$.each(back.data.cm,function(i){
				//客服回复html拼装
				if(back.data.cm[i].state == 2){
					ifReplayHtml = '<div class="feedback_label green">' + look._I18N_DATA.$18/**已回复**/ + '</div>';
					replayHtml = "";
					if(back.data.cm[i].reply){
						for(var j = 0; j < back.data.cm[i].reply.length; j++){
							if(j == 0){
								replayHtml += '<div class="feedback_content service_reply"><div class="left">' + look._I18N_DATA.$67/**客服回复：**/ + '</div>';
							}else{
								replayHtml += '<div class="feedback_content"><div class="left">' + look._I18N_DATA.$68/**补充回复：**/ + '</div>';
							}
							replayHtml += 
							'	<div class="right">' + back.data.cm[i].reply[j].split("<br>┌")[0] + '</div>'+
							'	<div class="clear"></div>'+
							'</div>'
						}
					}
				}else{
					ifReplayHtml = '<div class="feedback_label">' + look._I18N_DATA.$17/**未回复**/ + '</div>';
					replayHtml = "";
				}
				$("#pagerPanelBottom").before(
					'<div class="retrieve_panel" app_id="' + back.data.cm[i].appid + '">' +
					'	<div class="content_panel">' +
					ifReplayHtml +
					'		<p><span>' + back.data.cm[i].createTime + '</span><span>' + look._I18N_DATA.$60/**设备ID：**/ + '<a href="javascript:" class="blue">' + back.data.cm[i].deviceId + '</a></span><span>' + look._I18N_DATA.$87/**mac地址：**/ + '<a href="javascript:" class="blue">' + back.data.cm[i].mac + '</a></span></p>' +
					'		<p><span><b>' + back.data.cm[i].appName + '</b></span><span>' + look._I18N_DATA.$54/**邮箱：**/ + back.data.cm[i].email + '</span><span>' + look._I18N_DATA.$59/**用戶名：**/ + back.data.cm[i].userName + '</span></p>' +
					'		<div class="feedback_content">' +
					'			<div class="left">' + look._I18N_DATA.$65/**反馈内容：**/ + '</div>' +
					'			<div class="right">' + back.data.cm[i].description.replace(/\n/g, "<br>") + '</div>' +
					'			<div class="clear"></div>' +
					'		</div>' +
					replayHtml +
					'	</div>' +
					'	<div class="send_panel">' +
					'		<div class="send_panel_in">' +
					'			<div class="send_subset text">' + look._I18N_DATA.$605/**回复**/ + '…</div>' +
					'			<div class="send_editor">' +
					'				<div class="send_element">' +
					'					<div class="left">' + look._I18N_DATA.$69/**反馈邮箱：**/ + '</div>' +
					'					<div class="center"><input type="text" class="text replay_email_input" value="' + back.data.cm[i].email + '" /></div>' +
					'					<div class="clear"></div>' +
					'				</div>' +
					'				<div class="send_element">' +
					'					<div class="left">' + look._I18N_DATA.$67/**客服回复：**/ + '</div>' +
					'					<div class="center"><textarea class="replay_content_textarea"></textarea></div>' +
					'					<div class="right">' +
					(publicInit.authenCheck(look._AUTHEN.cs, 3) ? '<a href="javascript:" class="a_as_button confirm_send_subset" replay_id="' + back.data.cm[i].id + '">' + look._I18N_DATA.$613/**发送**/ + '</a>' : '') +
					'						<a href="javascript:" class="a_as_button a_as_gray close_send_editor">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'					</div>' +
					'					<div class="clear"></div>' +
					'				</div>' +
					'			</div>' +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
			});
			$(".send_subset").bind("click",function(){
				$(this).hide().next(".send_editor").slideDown("fast").find(".replay_content_textarea").val("").focus();
			});
			$(".close_send_editor").bind("click",function(){
				$(this).parents(".send_editor").hide().prev(".send_subset").show();
			});
			$(".confirm_send_subset").bind("click",function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var $id = $(this).attr("replay_id"),
					$appId = $(this).parents(".retrieve_panel").attr("app_id"),
					feedbackContent = "<br>┌ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<" + $appId + "><br>"+$(this).parents(".retrieve_panel").find(".feedback_content").children(".right").html()+"<br>└ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<br>",
					$content = $(this).parents(".send_editor").find(".replay_content_textarea").val().replace(/[(^*\n*)|(^*\r*)]/g, "<br>"),
					$email = $.trim($(this).parents(".send_editor").find(".replay_email_input").val());
				if($content == ""){
					look.showInfo.error(look._I18N_DATA.$400/**回复内容不能为空……**/);
					$(this).parents(".send_editor").find(".replay_content_textarea").focus();
					return false;
				}
				$(this).addClass("a_as_disabled");
				look.showInfo.right(look._I18N_DATA.$426/**正在发送回复到：{email}，这可能需要一点时间…**/.replace(/{email}/ig, $email));
				sendRetrieveAccountMessageRequest($id, $appId, encodeURI($content + feedbackContent), $email);
			});
		}else{
			$("#pagerPanelBottom").before('<div class="retrieve_panel"><p class="no_result">' + look._I18N_DATA.$300/**无反馈信息…**/ + '</p></div>');
		}
		setPager(".pager", look._PAGER_SIZE, location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		$("#pagerPanelBottom").before('<div class="retrieve_panel"><p class="no_result">' + look._I18N_DATA.$300/**无反馈信息…**/ + '</p></div>');
		$(".pager").empty();
		$("#resultCount").text("0");
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 客服系统 -> 找回帐号反馈
//* 回复“找回帐号反馈”callback
//*************************************
var retrieveAccountMessageCallback = function(back){
	if(back.code == 0){
		var $obj = $("a.confirm_send_subset[replay_id=" + back.data.messageId + "]");
		var replayHtml = "";
		if(look.getHashParam("state") == "1"){
			$obj.parents(".retrieve_panel").fadeOut();
		}else{
			if($obj.parents(".retrieve_panel").find(".feedback_label").text() == look._I18N_DATA.$17/**未回复**/){
				replayHtml += '<div class="feedback_content service_reply"><div class="left">' + look._I18N_DATA.$67/**客服回复：**/ + '</div>';
				$obj.parents(".retrieve_panel").find(".feedback_label").addClass("green").text(look._I18N_DATA.$18/**已回复**/);
			}else{
				replayHtml += '<div class="feedback_content"><div class="left">' + look._I18N_DATA.$68/**补充回复：**/ + '</div>';
			}
			$obj.parents(".send_editor").hide().prev(".send_subset").show();
			replayHtml +=
				'	<div class="right">' + $obj.parents(".send_editor").find(".replay_content_textarea").val().replace(/[(^*\n*)|(^*\r*)]/g, "<br>") + '</div>' +
				'	<div class="clear"></div>' +
				'</div>';
			$obj.parents(".retrieve_panel").children(".content_panel").append(replayHtml);
			$obj.removeClass("a_as_disabled");
		}
		look.showInfo.right(look._I18N_DATA.$428/**回复已经发送到对应的邮箱…**/);
	}else{
		look.showInfo.error(look._I18N_DATA.$429/**发送失败：**/ + "[code:" + back.code + ",message:" + back.message + "]");
	}
}

//*************************************
//* 客服系统 -> 客服反馈
//* 获取“反馈类型字典”callback
//*************************************
var getFeedBackTypeDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				look._FEEDBACK_TYPE_DIC_ARRAY.length = 0;
				$.each(back.data.mtypes, function(i){
					look._FEEDBACK_TYPE_DIC_ARRAY.push(new Array(back.data.mtypes[i].id, back.data.mtypes[i].name));
				});
				getFeedBackTypeDictionaryCallback.Assay();
			}
			else {
				look.showInfo.error(back.code + look._I18N_DATA.$411/**:反馈类型字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay : function(){
		$("#feedbackTypeSelect").children().first().nextAll().remove();
		$.map(look._FEEDBACK_TYPE_DIC_ARRAY, function(n){
			$("#feedbackTypeSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
		});
		$("#feedbackTypeSelect option[value='" + look.getHashParam("f_type") + "']").attr("selected", "selected");
	}
}

//*************************************
//* 客服系统 -> 客服反馈
//* 获取“反馈信息”列表callback
//*************************************
var getFeedbackListCallback = function(back){//resultPanel
	var resultPanel = $("#resultPanel");
	$("#resultCount").text(back.data.totalCount ? back.data.totalCount : "-");
	$("#resultLoader").hide();
	if (back.code == 0) {
		if(back.data.count != 0){
			var ifReplayHtml = "",
				userName = "";
			resultPanel.empty();
			$.each(back.data.messages, function(i, list){
				var ifHistory = "",	ignoreSubsetHtml = "";
				switch(list.state){
				case 4 :	ifReplayHtml = '<b class="color_gray">' + look._I18N_DATA.$19/**已忽略**/ + '</b>';
					break;
				case 2 :	ifReplayHtml = '<b class="color_green">' + look._I18N_DATA.$18/**已回复**/ + '</b>';
							ifHistory = '<a href="javascript:" class="blue service_history_subset">' + look._I18N_DATA.$56/**收起历史记录**/ + '</a>';
							ignoreSubsetHtml = '　<a href="javascript:" class="a_as_button a_as_red ignore_subset">' + look._I18N_DATA.$606/**忽略**/ + '</a>';
					break;
				case 1 :	ifReplayHtml = '<b class="color_yellow">' + look._I18N_DATA.$17/**未回复**/ + '</b>';
							ignoreSubsetHtml = '　<a href="javascript:" class="a_as_button a_as_red ignore_subset">' + look._I18N_DATA.$606/**忽略**/ + '</a>';
					break;
				}
				var checkedClass = $.map(look._BATCH_FEEDBACK_REPLAY_ARRAY, function(n){
					return n == list.id ? ' checked="checked"' : null;
				});
				var appName = $.map(look._APP_INFO_DIC_ARRAY, function(n){
					if(n[0] == look.getHashParam("appid")){return n[1];}
				});
				list.userName ? userName = list.userName : userName = look._I18N_DATA.$58/**"暂无"**/;
				resultPanel.append(
					'<div class="result_element" m_id="' + list.id + '">' +
					'	<div class="sort_label" m_type="' + list.type + '">' + list.typeName + '</div>' +
					'	<div class="check_label"><label><input type="checkbox" class="checkbox" m_id="' + list.id + '"' + checkedClass + ' />' + list.id + '</label></div>' +
					'	<div class="result_detail">' +
					'		<table cellpadding="0" cellspacing="0">' +
					'			<tbody>' +
					'				<tr>' +
					'					<td class="t_date">' +
					'						<p></p>' +
					'						<p><span>' + list.createTime + '</span></p>' +
					'					</td>'+
					'					<td class="t_user">' +
					'						<p><span>' + look._I18N_DATA.$59/**用戶名：**/ + '</span><a href="' + look.setParam([["search_type", "2"],["search_word", userName],["page", "1"]], location.hash) + '" class="blue">' + userName + '</a></p>' +
					'						<p><span>' + look._I18N_DATA.$64/**User ID：**/ + '</span><a href="' + look.setParam([["search_type", "1"],["search_word", back.data.messages[i].platformId],["page", "1"]], location.hash) + '" class="blue">' + back.data.messages[i].platformId + '</a></p>' +
					'						<p><span>' + look._I18N_DATA.$2073/**付费情况：**/ + '</span>' + (list.pay == 1 ? '<a href="' + look.setParam([["pay","1"],["page", "1"]], location.hash) + '" class="blue">' + look._I18N_DATA.$1114/**已付费**/ + '</a>' : look._I18N_DATA.$1115/**未付费**/) + '</p>' +
					'					</td>'+
					'					<td class="t_device">'+
					'						<p><span>' + look._I18N_DATA.$60/**設備id：**/ + '</span><a href="' + look.setParam([["search_type", "4"],["search_word", back.data.messages[i].deviceId],["page", "1"]], location.hash) + '" class="blue">' + back.data.messages[i].deviceId + '</a></p>' +
					'						<p><span>' + look._I18N_DATA.$61/**設備信息：**/ + '</span><span>' + back.data.messages[i].deviceInfo + '</span></p>' +
					'						<p><span>' + look._I18N_DATA.$87/**mac地址：**/ + '</span><a href="' + look.setParam([["search_type", "5"],["search_word", back.data.messages[i].mac],["page", "1"]], location.hash) + '" class="blue">' + back.data.messages[i].mac + '</a></p>' +
					'					</td>'+
					'					<td class="t_theme">' + back.data.messages[i].message.replace(/[(^*\n*)|(^*\r*)]/g, "<br>") + '</td>' +
					'					<td class="t_status">' + ifReplayHtml + '</td>' +
					'				</tr>' +
					'				<tr>' +
					'					<td colspan="4">' +
					'						<p>' +
					'							<span>' + appName + '</span>' +
//					'							<span class="center">分配给：guodegang</span>' +
					'							<span class="right">' + (publicInit.authenCheck(look._AUTHEN.cs, 19) ? '<a class="a_as_icon collect_subset' + (list.collect == 1 ? ' selected" st="' + look._I18N_DATA.$5101/**点击取消收藏**/ + '"' : '" st="' + look._I18N_DATA.$5100/**点击收藏本条反馈**/ + '"')  + ' href="javascript:"><tt class="icon collect_icon"></tt></a>'  : '') + '</span>' +
					'						</p>' +
					'					</td>' +
					'					<td class="t_operate">' + (publicInit.authenCheck(look._AUTHEN.cs, 9) ? '<a href="javascript:" class="a_as_button reply_subset">' + look._I18N_DATA.$605/**回复**/ + '</a>' : '') + (publicInit.authenCheck(look._AUTHEN.cs, 10) ? ignoreSubsetHtml : '') + '</td>' +
					'				</tr>' +
					'			</tbody>' +
					'		</table>' +
					'	</div>' +
					'	<div class="reply_panel">' +
					'		<div class="reply_panel_in">' +
					'			<div class="reply_editor">' +(publicInit.authenCheck(look._AUTHEN.cs, 8) ? 
					'				<div class="reply_element">' + 
					'					<div class="cell">' +
					'						<div class="left">' + look._I18N_DATA.$62/**預設回复：**/ + '</div>' +
					'						<select class="preset_reply_select"><option value="">' + look._I18N_DATA.$24/**請選擇**/ + '</option></select>' +
					'					</div>' +
					'					<div class="clear"></div>' +
					'				</div>' : '') +
					'				<div class="reply_element">' +
					'					<div class="left">' + look._I18N_DATA.$63/**回复內容：**/ + '</div>' +
					'					<div class="center"><textarea></textarea></div>' +
					'					<div class="clear"></div>' +
					'				</div>'+
					'				<div class="reply_button">' +
					'					<a href="javascript:" class="a_as_button confirm_reply_subset"  m_id="' + back.data.messages[i].id + '">' + look._I18N_DATA.$600 + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_reply_subset">' + look._I18N_DATA.$601 + '</a>' +
										(publicInit.authenCheck(look._AUTHEN.cs, 11) ? ifHistory : '') +
					'				</div>' +
					'			</div>' +
					'			<div class="reply_history_panel">' +
					'				<div class="reply_history_panel_in"></div>' +
					'			</div>' +
					'		</div>' +
					'		<div class="clear"></div>' +
					'	</div>' +
					'</div>'
				);
			});
			var batchMessage = {
				add : function(platformId){
					for(var j = 0; j < look._BATCH_FEEDBACK_REPLAY_ARRAY.length; j++){
						if(platformId == look._BATCH_FEEDBACK_REPLAY_ARRAY[j]){
							return;
						}
					}
					look._BATCH_FEEDBACK_REPLAY_ARRAY.push(platformId);
					this.count();
				},
				remove : function(platformId){
					look._BATCH_FEEDBACK_REPLAY_ARRAY = $.grep(look._BATCH_FEEDBACK_REPLAY_ARRAY, function(n,i){
						return n == platformId;
					},true);
					this.count();
				},
				count : function(){
					$.cookie("batch_message", JSON.stringify(look._BATCH_FEEDBACK_REPLAY_ARRAY));
				},
				clear : function(){
					look._BATCH_FEEDBACK_REPLAY_ARRAY.length = 0;
					$.cookie("batch_message", null);
					batchMessage.assy();
					$(".check_label input.checkbox").attr("checked", false);
					look.showInfo.right(look._I18N_DATA.$422/**已清除全部选择的反馈条目…**/);
				},
				assy : function(){
					if (look._BATCH_FEEDBACK_REPLAY_ARRAY.length > 0) {
						$("#batchFeedback").fadeIn();
					}else {
						$("#batchFeedback,#batchFeedbackEditorPanel").hide();
					}
					$("#batchListPanel").empty();
					$.map(look._BATCH_FEEDBACK_REPLAY_ARRAY, function(n){
						$("#batchListPanel").prepend('<label><input type="checkbox" class="checkbox" checked="checked" m_id="' + n + '">' + n + '</label>');
					});
					//[事件]已选择的信息
					$("#batchListPanel input.checkbox").unbind("click").bind("click", function(){
						var pId = $(this).attr("m_id");
						if (!$(this).is(":checked")) {batchMessage.remove(pId);}
						$(".check_label input.checkbox").each(function(){
							$(this).attr("checked",false);
							var obj = $(this);
							$.map(look._BATCH_FEEDBACK_REPLAY_ARRAY, function(n){
								if(n == obj.attr("m_id")){
									obj.attr("checked",true);
								}
							});
						});
						batchMessage.assy();
					});
				}
			};
			batchMessage.assy();
			
			$(".collect_subset").floater({
				closer:false,
				backgroundColor:"#333",
				borderColor:'#333',
				fontColor:'#fff',
				padding:[4,6,4,6]
			});
			//[事件]收藏按钮
			$(".collect_subset").unbind("click").bind("click", function(){
				if($(this).hasClass("disabled")){return false;}
				var messageId = $(this).parents(".result_element").attr("m_id"),
					collect = $(this).hasClass("selected") ? 0 : 1;
				collectServiceFeedbackMessageRequest(messageId, collect);
				look._SEVICE_COLLECT_ARRAY.push(new Array(messageId, collect));
				$(this).addClass("disabled");
			});
			//[事件]展开收起回复控件的按钮
			$(".reply_subset").unbind("click").bind("click", function(){
				var replyPanel = $(this).parents(".result_detail").next(".reply_panel");
				if(replyPanel.is(":hidden")){
					replyPanel.fadeIn().find("textarea").focus();
					$(this).addClass("a_as_gray").text(look._I18N_DATA.$39/**收起**/);
					var element = $(this).parents(".result_element");
					if(element.find(".reply_history_element").length == 0 && (element.find(".t_status").text() == look._I18N_DATA.$18/**已回复**/ || element.find(".t_status").text() == look._I18N_DATA.$19/**已忽略**/)){
						var messageId = $(this).parents(".result_element").attr("m_id");
						look._TEMP = messageId;
						publicInit.authenCheck(look._AUTHEN.cs, 11) ? getServiceFeedbackMessageRequest(messageId) : "";
					}
					//请求预设回复
					if(publicInit.authenCheck(look._AUTHEN.cs, 8)){
						if(look._ALL_PRESET_REPLY_ARRAY && look._ALL_PRESET_REPLY_ARRAY.length != 0){
							getAllPresetReplyCallback.Assay();
						}else{
							Look.prototype._ALL_PRESET_REPLY_ARRAY = new Array();
							getAllPresetReplyRequest();
						}
					}
				}else{
					$(this).removeClass("a_as_gray").text(look._I18N_DATA.$605/**"回复"**/);
					replyPanel.fadeOut();
				}
			});
			//[事件]忽略按钮
			$(".ignore_subset").unbind("click").bind("click", function(){
				var messageId = $(this).parents(".result_element").attr("m_id");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$800/**确定忽略本条反馈条目？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						ignoreServiceFeedbackMessageRequest(messageId);
					}
				});
			});
			//[事件]取消回复按钮
			$(".cancel_reply_subset").unbind("click").bind("click", function(){
				$(this).parents(".reply_panel").hide().prev(".result_detail").find(".reply_subset").removeClass("a_as_gray").text(look._I18N_DATA.$605/**"回复"**/);
				$(this).parents(".reply_editor").find("textarea").val("");
			});
			//[事件]确认回复按钮
			$(".confirm_reply_subset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){
					return false;
				}
				var $id = $(this).attr("m_id"),
					$content = $.trim($(this).parents(".reply_editor").find("textarea").val());
				if($content == ""){
					look.showInfo.error(look._I18N_DATA.$400/**"回复内容不能为空……"**/);
					$(this).parents(".reply_editor").find("textarea").focus();
					return false;
				}
				$(this).addClass("a_as_disabled");
				look.showInfo.right(look._I18N_DATA.$404/**"正在发送回复…"**/);
				sendServiceFeedbackMessageRequest($id, encodeURI($content.replace(/[(^*\n*)|(^*\r*)]/g, "%0a")));
			});
			//[事件]批量选择checkbox
			$(".check_label input.checkbox").unbind("click").bind("click", function(){
				var pId = $(this).attr("m_id");
				if($(this).is(":checked")){
					batchMessage.add(pId);
				}else{
					batchMessage.remove(pId);
				}
				batchMessage.assy();
			});
			//[事件]取消全部选择按钮
			$("#cancelAllBatchFeedbackSubset").unbind("click").bind("click", function(){
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$801/**确定清除所有已选择的反馈条目？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						batchMessage.clear();
						$.clearPop();
					}
				});
			});
			//[事件]查看历史记录
			$(".service_history_subset").unbind("click").bind("click", function(){
				var element = $(this).parents(".result_element").find(".reply_history_panel");
				if(element.is(":hidden")){
					$(this).text(look._I18N_DATA.$56/**收起历史记录**/);
					element.fadeIn();
					var scrollTopValue = parseInt($("#wrapper").scrollTop()),
						offsetTopValue = parseInt($(this).offset().top);
					$("#wrapper").animate({scrollTop: scrollTopValue + offsetTopValue - 250},500);
				}else{
					$(this).text(look._I18N_DATA.$55/**查看历史记录**/);
					element.fadeOut();
				}
			});
		}else{
			resultPanel.html('<p class="no_result">' + look._I18N_DATA.$300/**無反饋信息…**/ + '</p>');
		}
		setPager(".pager", look._PAGER_SIZE, location.hash.split("&page="), back.data.totalCount ? back.data.totalCount : "0");
	}else{
		resultPanel.html('<p class="no_result">' + look._I18N_DATA.$300/**無反饋信息…**/ + '</p>');
		$(".pager").empty();
		$("#resultCount").text("0");
		look.showInfo.error(back.code + ":" + back.message);
	}
}


//*************************************
//* 客服系统 -> 客服反馈
//* 回复游戏内客服信息callback
//*************************************
var sendServiceFeedbackMessageCallback = function(back){
	if(back.code == 0){
		if(back.data.count == 1){
			var $obj = $(".confirm_reply_subset[m_id=" + back.data.result[0].messageId + "]");
			look.showInfo.right(look._I18N_DATA.$405/**回复发送成功！**/);
			$obj.removeClass("a_as_disabled").parents(".reply_panel").fadeOut(function(){
				$(this).find(".reply_history_panel_in").empty();
			}).find("textarea").val("");
			$obj.parents(".reply_panel").prev(".result_detail").find(".reply_subset").removeClass("a_as_gray").text(look._I18N_DATA.$605/**回复**/).next(".ignore_subset").remove();
			$obj.parents(".reply_panel").prev(".result_detail").find(".t_status").children("b").attr("class","color_green").text(look._I18N_DATA.$18/**已回复**/);
		}else if(back.data.count > 1){
			var successArray = new Array(), failArray = new Array(), theHtml = "";
			$.each(back.data.result, function(i){
				if(back.data.result[i].replyMessageId == 0){
					failArray.push(back.data.result[i].messageId);
				}else{
					successArray.push(back.data.result[i].messageId);
				}
			});
			theHtml +=
				'<p class="color_red" style="font-size:12px;line-height:24px;border-bottom:1px solid #eee;margin-bottom:5px;">' + look._I18N_DATA.$78/**失败个数：**/ + failArray.length + '</p>' +
				'<p style="line-height:16px;word-break:break-all;">' + failArray + '</p>' +
				'<p class="color_green" style="margin-top:10px;font-size:12px;line-height:24px;border-bottom:1px solid #eee;margin-bottom:5px;">' + look._I18N_DATA.$79/**成功个数：**/  + successArray.length + '</p>' +
				'<p style="line-height:16px;word-break:break-all;">' + successArray + '</p>';
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$81/**批量回复结果列表**/,
				closeSubset: true,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' + theHtml + '</div>' +
					'</div>'
			});
			if(failArray.length == 0){
				$("#batchFeedbackTextarea").val("");
				$("#batchFeedbackEditorPanel").hide();
			}
			//将失败的数组赋值给全局数组，并种入cookie
			look._BATCH_FEEDBACK_REPLAY_ARRAY = failArray;
			$.cookie("batch_message", JSON.stringify(look._BATCH_FEEDBACK_REPLAY_ARRAY));
		}
		//重新获取列表
		if($(".result_element").length == 0 || back.data.count > 1){
			getFeedbackListRequest(look.getHashParam("dream"), look.getHashParam("appid"), look.getHashParam("f_type"), look.getHashParam("state"), look.getHashParam("from"), look.getHashParam("to"), look.getHashParam("search_type"), look.getHashParam("search_word"), look.getHashParam("page"));
		}
	}else{
		look.showInfo.error(look._I18N_DATA.$423/**回复发送失败：**/ + "[code:" + back.code + ",message:" + back.message + "]");
	}
}
var sendServiceFeedbackMessageComplete = function(){
	$(".confirm_reply_subset, #confirmBatchFeedbackSubset").removeClass("a_as_disabled");
}

//*************************************
//* 客服系统 -> 客服反馈
//* 取得游戏内客服回复信息callback
//*************************************
var getServiceFeedbackMessageCallback = function(back){
	if (back.code == 0) {
		if (back.data != "") {
			var replyHistoryPanel = $(".check_label input.checkbox[m_id=" + look._TEMP + "]").parents(".result_element").find(".reply_history_panel_in");
			replyHistoryPanel.children(".reply_history_element").remove();
			$.each(back.data.messages, function(i){
				replyHistoryPanel.append(
					'<div class="reply_history_element" m_id="' + back.data.messages[i].id + '">' +
					'	<div class="sort_label">' + back.data.messages[i].typeName + '</div>' +
					'	<div class="answer_top">' +
					'		<span>' + look._I18N_DATA.$57/**客服…**/ + '</span><span class="gray">' + back.data.messages[i].createTime + '</span>' +
					'	</div>' +
					'	<div class="answer_content">' + back.data.messages[i].message.replace(/[(^*\n*)|(^*\r*)]|(%0a)/g, "<br>") + '</div>' +
					'</div>'
				);
			});
			replyHistoryPanel.children(".reply_history_element").slice(0,2).fadeIn();
			if(back.data.messages.length > 2){
				replyHistoryPanel.append('<div class="more_reply_history">' + look._I18N_DATA.$71/**加載較早歷史記錄**/ + '&gt;&gt;</div>');
				//[事件]显示较早的记录
				$(".more_reply_history").unbind("click").bind("click", function(){
					$(this).fadeOut().prevAll(".reply_history_element").fadeIn();
				})
			}
		}else{
			look.showInfo.error(back.code + look._I18N_DATA.$406/**：无客服回复历史记录…**/);
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 客服系统 -> 客服反馈
//* 忽略反馈信息callback
//*************************************
var ignoreServiceFeedbackMessageCallback = function(back){
	if(back.code == 0){
		if(back.data.count == 1){
			var $obj = $(".result_element[m_id=" + back.data.messageIds[0] + "]");
			look.showInfo.right(look._I18N_DATA.$424/**忽略成功！**/);
			$obj.remove();
			$.clearPop();
		}else if(back.data.count > 1){
			var successArray = new Array(), failArray = new Array(), theHtml = "";
			$.each(back.data.messageIds, function(i){
				successArray.push(back.data.messageIds[i]);
			});
			theHtml +=
				'<p class="color_red" style="font-size:12px;line-height:24px;border-bottom:1px solid #eee;margin-bottom:5px;">' + look._I18N_DATA.$78/**失败个数：**/ + failArray.length + '</p>' +
				'<p style="line-height:16px;word-break:break-all;">' + failArray + '</p>' +
				'<p class="color_green" style="margin-top:10px;font-size:12px;line-height:24px;border-bottom:1px solid #eee;margin-bottom:5px;">' + look._I18N_DATA.$79/**成功个数：**/ + successArray.length + '</p>' +
				'<p style="line-height:16px;word-break:break-all;">' + successArray + '</p>';
			$.lookPop({
				type: -1,
				title: look._I18N_DATA.$81/**批量回复结果列表**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' + theHtml + '</div>' +
					'</div>',
				closeSubset: true
			});
			//将失败的数组赋值给全局数组，并种入cookie
			look._BATCH_FEEDBACK_REPLAY_ARRAY = failArray;
			$.cookie("batch_message", JSON.stringify(look._BATCH_FEEDBACK_REPLAY_ARRAY));
		}
		//重新获取列表
		if($(".result_element").length == 0 || back.data.count > 1){location.hash = look.setParam([[]], location.hash);}
	}else{
		look.showInfo.error(look._I18N_DATA.$425/**忽略请求失败：**/ + "[code:" + back.code + ",message:" + back.message + "]");
	}
}

//*************************************
//* 客服系统 -> 客服反馈
//* 收藏反馈callback
//*************************************
var collectServiceFeedbackMessageCallback = function(back){
	if (back.code == 0) {
		if (back.data.messageIds && back.data.messageIds.length > 0){
			var tempArray = new Array();
			$.each(back.data.messageIds, function(i, list){
				var obj = $(".result_element[m_id='" + list + "'] .collect_subset");
				$.map(look._SEVICE_COLLECT_ARRAY, function(n){
					if(list == n[0]){
						if (n[1] == 1) {
							obj.addClass("selected").removeClass("disabled").attr("st", look._I18N_DATA.$5101/**点击取消收藏**/);
						} else if(n[1] == 0) {
							obj.removeClass("selected disabled").attr("st", look._I18N_DATA.$5100/**点击收藏本条反馈**/);
						}
					}else{
						tempArray.push(new Array(list, n[1]));
					}
				});
				if(look.getHashParam("collect") == "1"){
					var pageHash = look.getHashParam("page");
					obj.parents(".result_element").animate({"height": 0}, "slow", "easeInBounce", function(){
						$(this).remove();
						if($(".result_element").length == 0){location.hash = look.setParam([["page", pageHash != "" && pageHash > 1 ? pageHash - 1 : 1]], location.hash);}
					});
				}
			});
			look._SEVICE_COLLECT_ARRAY = tempArray;
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var collectServiceFeedbackMessageComplete = function(){
	$.map(look._SEVICE_COLLECT_ARRAY, function(n){
	 	$(".result_element[m_id='" + n[0] + "'] .collect_subset").removeClass("disabled");
	});
}

//*************************************
//* 客服系统 -> 客服反馈
//* 统计当天用户问题及客服反馈数量callback
//*************************************
var getServiceFeedbackStatCallback = function(back){
	if (back.code == 0) {
		$("#todayFeedbackCount").text(back.data.newMsgCount);
		$("#todayRelayCount").text(back.data.replayCount);
	}else{
		look.showInfo.error(look._I18N_DATA.$407/**获取当天用户问题及客服反馈数量失败：**/ + "[code:" + back.code + ",message:" + back.message + "]");
	}
}

//*************************************
//* 客服系统 -> 预设回复
//* 创建预设回复callback
//*************************************
var createPresetReplyCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$408/**：预设回复创建成功！**/);
		$("#presetReplyTitle, #presetReplyContent").val("");
		publicInit.inputTipStyle("label input.text, label textarea", ".publisher_cell label tt");
		if (look._ALL_PRESET_REPLY_ARRAY && look._ALL_PRESET_REPLY_ARRAY.length != 0) {
			look._ALL_PRESET_REPLY_ARRAY.length = 0;
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var createPresetReplyComplete = function(){
	$("#sendPresetReplySubset").removeClass("a_as_disabled").text(look._I18N_DATA.$608/**提交**/);
}

//*************************************
//* 客服系统 -> 预设回复
//* 获取所有预设回复callback
//*************************************
var getAllPresetReplyCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data.feedbacks && back.data.feedbacks.length != 0) {
				look._ALL_PRESET_REPLY_ARRAY.length = 0;
				$.each(back.data.feedbacks, function(i){
					look._ALL_PRESET_REPLY_ARRAY.push(new Array(back.data.feedbacks[i].id, back.data.feedbacks[i].title, back.data.feedbacks[i].content));
				});
				getAllPresetReplyCallback.Assay();
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$409/**:还没有一个预设回复…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay : function(){
		if($("#presetReplySelect").length != 0){
			$("#presetReplySelect").children().first().nextAll().remove();
			$.map(look._ALL_PRESET_REPLY_ARRAY, function(n){
				$("#presetReplySelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
			});
			//[事件]选择预设回复
			$("#presetReplySelect").unbind("change").bind("change", function(){
				var selectOption = $(this).val();
				if(selectOption == ""){
					$("#presetReplyTitle, #presetReplyContent").val("");
				}
				$.map(look._ALL_PRESET_REPLY_ARRAY, function(n){
					if(n[0] == selectOption){
						$("#presetReplyTitle").val(n[1]);
						$("#presetReplyContent").val(n[2]);
					}
				});
				$("#presetReplyContent").focus();
				publicInit.inputTipStyle("label input.text, label textarea", ".publisher_cell label tt");
			});
		}else{
			if($(".preset_reply_select").length != 0){
				$(".preset_reply_select").each(function(){
					$(this).children().first().nextAll().remove();
				});
				$.map(look._ALL_PRESET_REPLY_ARRAY, function(n){
					$(".preset_reply_select").each(function(){
						$(this).append('<option value="' + n[0] + '">' + n[1] + '</option>');
					});
				});
				//[事件]选择预设回复
				$(".preset_reply_select").unbind("change").bind("change", function(){
					var selectOption = $(this).val(),
						selectTextarea = $(this).parents(".reply_element").next().find("textarea");
					if(selectOption == ""){
						selectTextarea.val("").focus();
					}
					$.map(look._ALL_PRESET_REPLY_ARRAY, function(n){
						if(n[0] == selectOption){
							selectTextarea.val(n[2]).parents(".reply_editor").find(".confirm_reply_subset").focus();
						}
					});
				});
			}
		}
	}
}

//*************************************
//* 客服系统 -> 预设回复
//* 修改更新预设回复callback
//*************************************
var modifyPresetReplyCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$410/**:预设回复修改成功！**/);
		$("#presetReplyTitle, #presetReplyContent").val("");
		publicInit.inputTipStyle("label input.text, label textarea", ".publisher_cell label tt");
		getAllPresetReplyRequest();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var modifyPresetReplyComplete = function(){
	$("#modifyPresetReplySubset").removeClass("a_as_disabled").text(look._I18N_DATA.$607/**修改**/);
}

//*************************************
//* 客服系统 -> 自动回复
//* 查询客服自动回复列表callback
//*************************************
var getAutoReplyCallback = function(back){
	if (back.code == 0) {
		if(back.data.state != undefined){
			switch(back.data.state){
				case 0	:	$("#autoReplyState").html('<tt>' + look._I18N_DATA.$95/**状态：**/ + '</tt><b class="color_red">' + look._I18N_DATA.$1125/**已关闭**/ + '</b>');
							$("#openAutoReplySubset").css("display", "inline-block").siblings(".a_as_button").hide();
					break;
				case 1	: 	$("#autoReplyState").html('<tt>' + look._I18N_DATA.$95/**状态：**/ + '</tt><b class="color_green">' + look._I18N_DATA.$1126/**已开启**/ + '</b>');
							$("#closeAutoReplySubset").css("display", "inline-block").siblings(".a_as_button").hide();
					break;
			}
		}
		if (back.data.items && back.data.items.length != 0) {
			$.each(back.data.items, function(i, list){
				$(".publisher_label textarea[lang='" + list.locale + "']").val(list.message.replace(/(%0a)/g, "\n"));
			});
			publicInit.inputTipStyle("label textarea", ".publisher_cell label tt");
		}else{
			look.showInfo.error(look._I18N_DATA.$592/**自动回复数据为空**/);
		}
	}else{
		look.showInfo.error("：[code:" + back.code + ",message:" + back.message + "]");
	}
}

//*************************************
//* 客服系统 -> 自动回复
//* 关闭自动回复callback
//*************************************
var closeAutoReplyCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$593/**：自动回复已经关闭**/);
		getAutoReplyRequest();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var closeAutoReplyComplete = function(){
	$("#closeAutoReplySubset").removeClass("a_as_disabled").text(look._I18N_DATA.$610/**关闭**/);
}

//*************************************
//* 客服系统 -> 自动回复
//* 开启自动回复callback
//*************************************
var openAutoReplyCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$594/**：自动回复已经开启**/);
		getAutoReplyRequest();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var openAutoReplyComplete = function(){
	$("#openAutoReplySubset").removeClass("a_as_disabled").text(look._I18N_DATA.$658/**开启**/);
}

/*** service Callback END ***/

/*** empire_mis Callback START ***/

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 字典
//* 获取“消费类型字典”callback
//*************************************
var empireConsumeDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				$.each(back.data, function(i, list){
					look._EMPIRE_CONSUME_DIC_ARRAY.push(new Array(list.key, list.value));
				});
				getConsumeRecordAssay(look._EMPIRE_CONSUME_DIC_ARRAY);
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$450/**：消费类型字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 字典
//* 获取“宝石字典”callback
//*************************************
var empireJewelDictionaryCallback = {
	Convert : function(back){
		if(back.code == 0){
			look._EMPIRE_JEWEL_DIC_ARRAY = JSON.stringify(back);
			empireJewelDictionaryCallback.Assay("list");
			empireJewelDictionaryCallback.Assay("select");
		}else{
			look._EMPIRE_JEWEL_DIC_ARRAY.length = 0;
			look.showInfo.error(look._I18N_DATA.$554/**获取宝石字典失败…**/);	
		}
	},
	Assay : function(type){
		var back = $.parseJSON(look._EMPIRE_JEWEL_DIC_ARRAY),
			jewelTypeSelect = $("select[jewel_type]"), jewelTypeElement = $("*:not(select)[jewel_type]");
		if(back){
			if(type == "select"){
				jewelTypeSelect.each(function(){
					var type = $(this).attr("jewel_type"), thisElement = $(this);
					thisElement.children().first().nextAll().remove();
					$.each(back.data, function(i, list){
						var selectedHtml = (list.key == thisElement.attr("jewel_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.key + '"' + selectedHtml + '>' + list.value+ '</option>');
					});
				});
			}
			if(type == "list"){
				$.each(back.data, function(i, list){
					jewelTypeElement.each(function(){
						var type = $(this).attr("jewel_type");
						if(list.key == type){
							$(this).text(list.value);return;
						}
					})
				});
			}
		}else{
			look.showInfo.error(look._I18N_DATA.$498/**获取相关字典数据失败，请重新操作…**/);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 字典
//* 获取“祝福字典”callback
//*************************************
var empireSpereDictionaryCallback = {
	Convert : function(back){
		if(back.code == 0){
			look._EMPIRE_SPERE_DIC_ARRAY = JSON.stringify(back);
			empireSpereDictionaryCallback.Assay("list");
			empireSpereDictionaryCallback.Assay("select");
		}else{
			look._EMPIRE_SPERE_DIC_ARRAY.length = 0;
			look.showInfo.error(look._I18N_DATA.$555/**获取祝福字典失败…**/);	
		}
	},
	Assay : function(type){
		var back = $.parseJSON(look._EMPIRE_SPERE_DIC_ARRAY),
			spereTypeSelect = $("select[spere_type]"), spereTypeElement = $("*:not(select)[spere_type]");
		if(back){
			if(type == "select"){
				spereTypeSelect.each(function(){
					var type = $(this).attr("spere_type"), thisElement = $(this);
					thisElement.children().first().nextAll().remove();
					$.each(back.data, function(i, list){
						var selectedHtml = (list.key == thisElement.attr("spere_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.key + '"' + selectedHtml + '>' + list.value+ '</option>');
					});
				});
			}
			if(type == "list"){
				$.each(back.data, function(i, list){
					spereTypeElement.each(function(){
						var type = $(this).attr("spere_type");
						if(list.key == type){
							$(this).text(list.value);return;
						}
					})
				});
			}
		}else{
			look.showInfo.error(look._I18N_DATA.$498/**获取相关字典数据失败，请重新操作…**/);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 字典
//* 获取“将魂字典”callback
//*************************************
var empireSoulDictionaryCallback = {
	Convert : function(back){
		if(back.code == 0){
			look._EMPIRE_SOUL_DIC_ARRAY = JSON.stringify(back);
			empireSoulDictionaryCallback.Assay("list");
			empireSoulDictionaryCallback.Assay("select");
		}else{
			look._EMPIRE_SOUL_DIC_ARRAY.length = 0;
			look.showInfo.error(look._I18N_DATA.$7021/**获取将魂字典失败…**/);	
		}
	},
	Assay : function(type){
		var back = $.parseJSON(look._EMPIRE_SOUL_DIC_ARRAY),
			soulTypeSelect = $("select[soul_type]"), soulTypeElement = $("*:not(select)[soul_type]");
		if(back){
			if(type == "select"){
				soulTypeSelect.each(function(){
					var type = $(this).attr("soul_type"), thisElement = $(this);
					thisElement.children().first().nextAll().remove();
					$.each(back.data, function(i, list){
						var selectedHtml = (list.key == thisElement.attr("soul_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.key + '"' + selectedHtml + '>' + list.value+ '</option>');
					});
				});
			}
			if(type == "list"){
				$.each(back.data, function(i, list){
					soulTypeElement.each(function(){
						var type = $(this).attr("soul_type");
						if(list.key == type){
							$(this).text(list.value);return;
						}
					})
				});
			}
		}else{
			look.showInfo.error(look._I18N_DATA.$498/**获取相关字典数据失败，请重新操作…**/);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 获取“玩家角色信息”callback
//*************************************
var empireGetUserInfoCallback = function(back){
	var empireUserInfoPanel = $("#empireUserInfoPanel");
	empireUserInfoPanel.empty();
	if(back.code == 0){
		look._EMPIRE_USER_INFO.Del_UID();
		if (back.data != "") {
			var banSubsetHtml = "", userStatusHtml = "", state = back.data.status, popBanAccountHtml = "";
			if(state == 0){
				userStatusHtml = '<b class="color_green">' + look._I18N_DATA.$719/**正常的**/ + '</b>';
				banSubsetHtml = '<a href="javascript:" class="a_as_button a_as_red right ban_subset" st="1">' + look._I18N_DATA.$631/**封禁**/ + '</a>';
				popBanAccountHtml = '<b class="color_yellow">[' + look._I18N_DATA.$631/**封禁**/ + ']</b>';
			}else if(state == 1){
				userStatusHtml = '<b class="color_red">' + look._I18N_DATA.$702/**封禁的**/ + '</b>';
				banSubsetHtml = '<a href="javascript:" class="a_as_button a_as_green right ban_subset" st="0">' + look._I18N_DATA.$630/**解禁**/ + '</a>';
				popBanAccountHtml = '<b class="color_green">[' + look._I18N_DATA.$630/**解禁**/ + ']</b>';
			}
			empireUserInfoPanel.append(
				'<div class="publisher_panel" u_id="' + back.data.userId + '">' +
				'	<div class="publisher_cell top">' +
				'		<div class="publisher_title"><span><tt>' + look._I18N_DATA.$94/**昵称：**/ + '</tt>' + back.data.nickName + '</span><span class="right"><tt>' + look._I18N_DATA.$95/**状态：**/ + '</tt>' + userStatusHtml + '</span></div>' +
				'	</div>' +
				'	<div class="publisher_cell">' +
				'		<form id="empireUserInfoForm">' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$64/**userId：**/ + '</span><span>' + back.data.userId + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2000/**等级：**/ + '</span><span>' + back.data.level + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2001/**粮食：**/ + '</span><span>' + back.data.food + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="food" value="' + back.data.food + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2002/**银币：**/ + '</span><span>' + back.data.silver + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="silver" value="' + back.data.silver + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2066/**金钥匙：**/ + '</span><span>' + back.data.goldKey + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="goldKey" value="' + back.data.goldKey + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2067/**钻石钥匙：**/ + '</span><span>' + back.data.diamondKey + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="diamondKey" value="' + back.data.diamondKey + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2004/**最大允许上场英雄：**/ + '</span><span>' + back.data.maxHeroAlow + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2005/**战斗力：**/ + '</span><span>' + back.data.power + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2006/**训练师体力：**/ + '</span><span>' + back.data.trainingPower + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="trainingPower" value="' + back.data.trainingPower + '" /></span>' + (publicInit.authenCheck(look._AUTHEN.misEmpire, 7) ? '<a href="javascript:" class="a_as_icon reset_power_subset" ps="training"><tt class="icon refresh_icon" title="' + look._I18N_DATA.$635/**恢复训练师体力**/ + '"></tt></a>' : '') + '</div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2008/**铁匠体力：**/ + '</span><span>' + back.data.forgePower + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="forgePower" value="' + back.data.forgePower + '" /></span>' + (publicInit.authenCheck(look._AUTHEN.misEmpire, 6) ? '<a href="javascript:" class="a_as_icon reset_power_subset" ps="iron"><tt class="icon refresh_icon" title="' + look._I18N_DATA.$636/**恢复铁匠体力**/ + '"></tt></a>' : '') + '</div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2068/**pvp连胜场数：**/ + '</span><span>' + back.data.pvpContinuousWin + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2007/**pvp声望：**/ + '</span><span>' + back.data.pvpFame + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="pvpFame" value="' + back.data.pvpFame + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2012/**pvp精力数：**/ + '</span><span>' + back.data.pvpEnergy + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="pvpEnergy" value="' + back.data.pvpEnergy + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2013/**pve体力数：**/ + '</span><span>' + back.data.pveEnergy + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="pveEnergy" value="' + back.data.pveEnergy + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2009/**竞技场勋章：**/ + '</span><span>' + back.data.arenaMedal + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="arenaMedal" value="' + back.data.arenaMedal + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2010/**剩余精英关挑战次数：**/ + '</span><span>' + back.data.eliteRemain + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2011/**精英关今日重置次数：**/ + '</span><span>' + back.data.eliteResetCount + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2014/**vip等级：**/ + '</span><span>' + back.data.vipLevel + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2069/**基础vip点数：**/ + '</span><span>' + back.data.basePoints + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2111/**游戏赠送vip点数：**/ + '</span><span>' + back.data.giftPoints + '</span><span class="look_hidden" style="display:none;"><input type="text" class="text long" name="vipPoints" value="' + back.data.giftPoints + '" /></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2112/**总共vip点数：**/ + '</span><span>' + back.data.totalPoints + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2015/**创建时间：**/ + '</span><span>' + back.data.createAt + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2016/**更新时间：**/ + '</span><span>' + back.data.updateAt + '</span></div>' +
				'		</form>' +
				'	</div>' +
				'	<div class="publisher_cell bottom">' +
				'		<div class="subset_cell no_margin">' +
				(publicInit.authenCheck(look._AUTHEN.misEmpire, 5) ? '<a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
				(publicInit.authenCheck(look._AUTHEN.misEmpire, 8) ? '<a href="javascript:" class="a_as_button unlock_subset" ut="formation">' + look._I18N_DATA.$633/**解锁全部阵型**/ + '</a>' : '') +
				(publicInit.authenCheck(look._AUTHEN.misEmpire, 9) ? '<a href="javascript:" class="a_as_button unlock_subset" ut="equipment">' + look._I18N_DATA.$634/**解锁全部装备**/ + '</a>' : '') +
				(publicInit.authenCheck(look._AUTHEN.misEmpire, 4) ? '<a href="javascript:" class="a_as_button a_as_gray right initialize_subset">' + look._I18N_DATA.$632/**初始化**/ + '</a>' : '') +
				(publicInit.authenCheck(look._AUTHEN.misEmpire, 3) ? banSubsetHtml : '') +
				'		</div>' +
				'		<div class="subset_cell look_hidden no_margin">' +
				'			<a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>' +
				'			<a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
				'		</div>' +
				'	</div>' +
				'</div>'
			);
			look._EMPIRE_USER_INFO.Set_UID(back.data.userId);
			$("#userIdInput").val(look._EMPIRE_USER_INFO.Get_UID());
			//[事件]修改
			$(".modify_subset").unbind("click").bind("click",function(){
				$(this).parent(".subset_cell").hide().next().show();
				empireUserInfoPanel.find(".publisher_row").children(".look_hidden").show().prev().hide();
				empireUserInfoPanel.find(".publisher_row").children(".look_hidden").first().children().focus();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click",function(){
				$(this).parent(".subset_cell").hide().prev().show();
				empireUserInfoPanel.find(".publisher_row").children(".look_hidden").hide().prev().show();
				empireUserInfoPanel.find(".publisher_row").find("input.text").each(function(){
					var string = $(this).parent().prev().text();
					$(this).val(string);
				});
			});
			//[事件]确认修改
			$(".confirm_modify_subset").unbind("click").bind("click",function(){
				var element = $("#empireUserInfoForm").children(".publisher_row"),
					ifBlank = false, ifNum = true;
				element.find("input[name]").each(function(){
					if($.trim($(this).val()) == ""){ifBlank = true;}
					if(isNaN($.trim($(this).val()))){ifNum = false;}
				});
				if(ifBlank){look.showInfo.error(look._I18N_DATA.$484/**所有输入项都不能为空…**/);return false;}
				if(!ifNum){look.showInfo.error(look._I18N_DATA.$485/**所有输入项必须为数字…**/);return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$820/**确定修改玩家{user}的数据？**/.replace(/{user}/ig, back.data.nickName) + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						empireModifyCharacterDataRequest($("#empireUserInfoForm").serialize());
					}
				});
			});
			//[事件]封禁&解禁
			$(".ban_subset").unbind("click").bind("click",function(){
				var status = $(this).attr("st");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$600/**确定**/ + popBanAccountHtml + look._I18N_DATA.$720/**玩家**/ + look._I18N_DATA.$9/**？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						empireModifyBanUserRequest(status);
					}
				});
			});
			//[事件]初始化
			$(".initialize_subset").unbind("click").bind("click",function(){
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$822/**确定{operate}玩家{user}的所有数据，变为新手玩家？**/.replace(/{operate}/ig, '<b class="color_red">[' + look._I18N_DATA.$632/**初始化**/ + ']</b>').replace(/{user}/ig, back.data.nickName) + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$66/**提醒**/,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$823/**初始化操作将{word}！再次确定是否执行？**/.replace(/{word}/ig, '<b class="color_red">' + look._I18N_DATA.$721/**不可逆**/ + '</b>') + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if(obj.hasClass("a_as_disabled")){return false;}
								obj.addClass("a_as_disabled");
								empireInitCharacterDataRequest();
							}
						});
					}
				});
			});
			//[事件]恢复铁匠&训练师体力
			$(".reset_power_subset").unbind("click").bind("click",function(){
				var powerType = $(this).attr("ps");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$600/**确定**/ + $(this).children("tt.icon").attr("title") + look._I18N_DATA.$9/**？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						switch(powerType){
							case "training" : empireResetTrainingPowerRequest();
								break;
							case "iron" : empireResetIronPowerRequest();;
								break;
							default : look.showInfo.error(look._I18N_DATA.$486/**未知恢复…**/);
						}
					}
				});
			});
			//[事件]解锁全部阵型&装备
			$(".unlock_subset").unbind("click").bind("click",function(){
				var unlockType = $(this).attr("ut");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$600/**确定**/ + $(this).text() + look._I18N_DATA.$9/**？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						switch(unlockType){
							case "formation" : empireUnlockFormationRequest();
								break;
							case "equipment" : empireUnlockEquipmentRequest();;
								break;
							default : look.showInfo.error(look._I18N_DATA.$487/**未知解锁…**/);
						}
					}
				});
			});
		}else{
			empireUserInfoPanel.append('<div class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</div>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 改变用户状态[封禁&解封]callback
//* 初始化“玩家角色数据”callback
//* 修改“玩家角色数据”callback
//* 恢复体力[铁匠&训练师]callback
//* 解锁全部阵型&装备callback
//*************************************
var empireRefreshUserInfoCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.data);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 获取玩家英雄信息callback
//*************************************
var empireGetUserHeroCallback = function(back){
	var heroAccountList = $("#heroAccountList");
	heroAccountList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				heroAccountList.append(
					'<tr h_id="' + list.heroId + '" h_name="' + list.heroName + '">' +
					'	<td>' + list.heroId + '</td>' +
					'	<td>' + list.heroName + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.exp + '</td>' +
					'	<td>' + list.career + '</td>' +
					'	<td>' + list.idx + '</td>' +
					'	<td>' + list.attack + '</td>' +
					'	<td>' + list.defence + '</td>' +
					'	<td>' + list.magic + '</td>' +
					'	<td>' + list.resistance + '</td>' +
					'	<td>' + list.passiveSkills + '</td>' +
					'	<td>' + list.activeCommonSkill + '</td>' +
					'	<td>' + list.activeSpecialSkill + '</td>' +
					'	<td>' + list.createAt + '</td>' +
					'	<td>' + list.updateAt + '</td>' +
					'	<td>' + (list.unlockStatus == "未获得" ? (publicInit.authenCheck(look._AUTHEN.misEmpire, 34) ? (list.canHire == 1 ? '<a href="javascript:" class="a_as_button a_as_green unlock_subset">' + look._I18N_DATA.$1240/***解锁***/ + '</a>' : list.unlockStatus) : 'N/A') : (list.evolution ? '<a href="javascript:" class="a_as_button evolution_subset">' + look._I18N_DATA.$1242/***进化***/ + '</a>' : (list.evolution == 0 ? '<b class="color_red">TOP</b>' : ''))) + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]解锁英雄
			$(".unlock_subset").unbind("click").bind("click", function(){
				var heroId = $(this).parents("tr").attr("h_id"),
					heroName = $(this).parents("tr").attr("h_name");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$877/**确定要为此用户解锁英雄{hero}？**/.replace(/{hero}/ig, '<b class="color_yellow">' + heroName + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						empireUnlockHeroRequest(heroId);
						obj.addClass("a_as_disabled");
					}
				});
			});
			//[事件]进化
			$(".evolution_subset").unbind("click").bind("click", function(){
				var heroId = $(this).parents("tr").attr("h_id"),
					heroName = $(this).parents("tr").attr("h_name");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$879/**确定要为此用户进化英雄{hero}？**/.replace(/{hero}/ig, '<b class="color_yellow">' + heroName + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						empireEvolutionHeroRequest(heroId);
						obj.addClass("a_as_disabled");
					}
				});
			});
		}else{
			heroAccountList.append('<tr><td colspan="16">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		heroAccountList.append('<tr><td colspan="16">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 英雄
//* 解锁英雄callback
//* 解锁全部英雄callback
//* 英雄进化callback
//* 修改英雄信息callback
//*************************************
var empireRefreshUserHeroCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$509/**成功！**/);
		if($.isArray(back.data)){
			empireGetUserHeroCallback(back);
		}else{
			location.hash = look.setParam([[]], location.hash);
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 英雄
//* 获取玩家将魂callback
//*************************************
var empireGetSoulCallback = function(back){
	if (back.code == 0) {
		$("#soulCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			publicInit.authenCheck(look._AUTHEN.misEmpire, 38) ? $("#previewSoulCell").show() : null;
		}
		look._EMPIRE_SOUL_DIC_ARRAY == undefined ? Look.prototype._EMPIRE_SOUL_DIC_ARRAY = new Array() : null;
		
		if (publicInit.authenCheck(look._AUTHEN.misEmpire, 39)) {
			$("#addSoulCell").show();
			//[事件]添加将魂
			$("#addSoulSubset").unbind("click").bind("click", function(){
				function getPoperRequest(obj, left, url, callback){
					var offLeft = obj.offset().left - left, offTop = obj.offset().top + 22;
					$.get(url, function(text){
						$.lookPopDiv({
							left: offLeft,
							top: offTop,
							contentHtml: text,
							addClass: "modify_top_poper"
						});
						callback();
					});
				}
				getPoperRequest($(this), 0, "game_account/empire/add_soul_poper.html", function(){
					look._EMPIRE_SOUL_DIC_ARRAY.length == 0 ? empireGetDictionaryRequest("soul") : empireSoulDictionaryCallback.Assay("select");
					$("#popConfirmAddSoulSubset").unbind("click").bind("click", function(){
						if($(this).hasClass("a_as_disabled")){return false;}
						var soulId = $("#soulSelect").val(),
							num = $.trim($("#numInput").val());
						if(soulId == ""){look.showInfo.error(look._I18N_DATA.$488/***请选择将魂…***/);return false;}
						if(num == ""){look.showInfo.error(look._I18N_DATA.$489/***请输入要添加的将魂数量…***/);$("#numInput").focus();return false;}
						empireModifySoulRequest(soulId, num);
						$(this).addClass("a_as_disabled");
					});
				});
			});
		}
		//[事件]查看将魂
		$("#previewSoulSubset").unbind("click").bind("click", function(){
			var html = '';
			$.each(back.data, function(i, list){
				html += '<span class="look_cell"><tt soul_type="' + list.soulId + '">' +  list.soulId + '</tt> [<b class="color_green">' +  list.num + '</b>]</span>';
			});
			$.lookPop({
				type: -1,
				title: look._I18N_DATA.$881/**玩家{userId}的将魂详情**/.replace(/{userId}/ig, '<span class="color_yellow">' + look._EMPIRE_USER_INFO.Get_UID() + '</span>'),
				html: '<div class="pop_content_text pop_cell">' + html + '</div>'
			});
			look._EMPIRE_SOUL_DIC_ARRAY.length == 0 ? empireGetDictionaryRequest("soul") : empireSoulDictionaryCallback.Assay("list");
		});
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 英雄
//* 修改将魂callback
//*********************************
var empireModifySoulCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		$.clearPopDiv();
		look.showInfo.right(back.code + look._I18N_DATA.$509/**成功！**/);
		empireGetSoulRequest();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 获取玩家装备信息callback
//*************************************
var empireGetUserEquipmentCallback = function(back){
	var equipmentDataList = $("#equipmentDataList");
	equipmentDataList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				equipmentDataList.append(
					'<tr>' +
					'	<td>' + list.id + '</td>' +
					'	<td equ_id="' + list.equId + '">' + list.equName + '</td>' +
					'	<td>' + list.value + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.exp + '</td>' +
					'	<td>' + list.inUse + '</td>' +
					'	<td>' + list.createAt + '</td>' +
					'	<td>' + list.updateAt + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			equipmentDataList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		equipmentDataList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 获取玩家家园建筑信息callback
//*************************************
var empireGetUserHomelandCallback = function(back){
	var homelandDataList = $("#homelandDataList");
	homelandDataList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				homelandDataList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.buildName + '</td>' +
					'	<td>' + list.grid + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.value + '</td>' +
					'	<td>' + list.material + '</td>' +
					'	<td>' + list.gatherTime + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			homelandDataList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		homelandDataList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 玩家竞技场
//* 获取callback
//*************************************
var empireGetUserArenaCallback = function(back){
	var arenaDataList = $("#arenaDataList");
	arenaDataList.empty();
	if (back.code == 0) {
		arenaDataList.append(
			'<tr>' +
			'	<td>' + back.data.continuousChallengeTimes + '</td>' +
			'	<td>' + back.data.medal + '</td>' +
			'	<td>' + back.data.remainChallengeTimes + '</td>' +
			'	<td>' + back.data.updateAt + '</td>' +
			'	<td>' + (publicInit.authenCheck(look._AUTHEN.misEmpire, 43) ? '<a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') + '</td>' +
			'</tr>' +
			'<tr class="look_hidden">' +
			'	<td><input type="text" class="text" value="' + back.data.continuousChallengeTimes + '" name="continuousChallengeTimes"/></td>' +
			'	<td><input type="text" class="text" value="' + back.data.medal + '" name="medal"/></td>' +
			'	<td><input type="text" class="text" value="' + back.data.remainChallengeTimes + '" name="remainChallengeTimes"/></td>' +
			'	<td>' + back.data.updateAt + '</td>' +
			'	<td><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
			'</tr>'
		);
		//[事件]修改
		$(".modify_subset").unbind("click").bind("click", function(){
			$(this).parents("tr").toggle().next().toggle().find("input.text:first").focus();
		});
		$(".cancel_subset").unbind("click").bind("click", function(){
			$(this).parents("tr").toggle().prev().toggle();
		});
		//[事件]确认修改
		$(".confirm_modify_subset").unbind("click").bind("click", function(){
			var element = $(this).parents("form"), isBlank = false;
			element.find("input.text").each(function(){
				if($.trim($(this).val()) == ""){
					isBlank = true;
					return false;
				}
			});
			if(isBlank){look.showInfo.error(look._I18N_DATA.$484/**所有输入项都不能为空…**/);element.find("input[value='']").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$882/**确定修改该玩家竞技场信息？**/ + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					empireModifyUserArenaRequest(element.serialize());
					obj.addClass("a_as_disabled");
				}
			});
		});
	}else{
		arenaDataList.append('<tr><td colspan="5">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 玩家竞技场
//* 修改callback
//*************************************
var empireModifyUserArenaCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$509/**成功！**/);
		empireGetUserArenaCallback(back);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> pvp信息
//* 获取callback
//*************************************
var empireGetPvpInfoCallback = function(back){
	var empirePvpInfoPanel = $("#empirePvpInfoPanel");
	empirePvpInfoPanel.empty();
	if(back.code == 0){
		if (back.data != "") {
			var energyPackHtml = "", energyPackValue = "", opponentHtml = "", opponentValue = "", warOpponentHtml = "", warOpponentValue = "";
			var energyPack = {"1": look._I18N_DATA.$1251/**小精力药**/, "2": look._I18N_DATA.$1252/**中型精力药**/, "3": look._I18N_DATA.$1253/**大型精力药**/}
			for(x in back.data.energyPackMap){
				energyPackHtml += '<em>' + energyPack[x] + ' [<i class="color_yellow">' + back.data.energyPackMap[x] + '</i>]</em>';
				energyPackValue += x + ":" + back.data.energyPackMap[x] + ","
			}
			for(x in back.data.opponentMap){
				opponentHtml += '<em>' + x + ' [<i class="color_yellow">' + back.data.opponentMap[x] + '</i>]</em>';
				opponentValue += x + ":" + back.data.opponentMap[x] + ","
			}
			for(x in back.data.warOpponentMap){
				warOpponentHtml += '<em>' + x + ' [<i class="color_yellow">' + back.data.warOpponentMap[x] + '</i>]</em>';
				warOpponentValue += x + ":" + back.data.warOpponentMap[x] + ","
			}
			empirePvpInfoPanel.append(
				'<div class="publisher_panel">' +
				'	<div class="publisher_cell top">' +
				'		<div class="publisher_title">TYPE：' + back.data.type + '</div>' +
				'	</div>' +
				'	<div class="publisher_cell">' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2114/**连胜次数：**/ + '</span><span>' + back.data.continuousWin + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2012/**pvp精力：**/ + '</span><span>' + back.data.energy + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2115/**声望：**/ + '</span><span>' + back.data.fame + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2116/**能量包信息：**/ + '</span><span class="item_cell">' + (energyPackHtml != "" ? energyPackHtml : "N/A") + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2117/**pvp对手：**/ + '</span><span class="item_cell">' + (opponentHtml != "" ? opponentHtml : "N/A") + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2118/**国战对手：**/ + '</span><span class="item_cell">' + (warOpponentHtml != "" ? warOpponentHtml : "N/A") + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2015/**创建时间：**/ + '</span><span>' + back.data.createAt + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2016/**更新时间：**/ + '</span><span>' + back.data.updateAt + '</span></div>' +
				'	</div>' +
				'	<div class="publisher_cell bottom">' +
				'		<div class="subset_cell no_margin">' +
				(publicInit.authenCheck(look._AUTHEN.misEmpire, 46) ? '<a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
				'		</div>' +
				'	</div>' +
				'</div>' + 
				'<div class="publisher_panel look_hidden"><form>' +
				'	<div class="publisher_cell top">' +
				'		<div class="publisher_title">TYPE：' + back.data.type + '</div>' +
				'	</div>' +
				'	<div class="publisher_cell">' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2114/**连胜次数：**/ + '</span><span><input type="text" class="text" name="continuousWin" value="' + back.data.continuousWin + '"></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2012/**pvp精力：**/ + '</span><span><input type="text" class="text" name="energy" value="' + back.data.energy + '"></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2115/**声望：**/ + '</span><span><input type="text" class="text" name="fame" value="' + back.data.fame + '"></span></div>' +
				'		<div class="publisher_row" title="' + look._I18N_DATA.$2119/**格式为：**/ + '1:value,2:value,3:value（1:' + look._I18N_DATA.$1251/**小精力药**/ + '，2:' + look._I18N_DATA.$1252/**中型精力药**/ + '，3:' + look._I18N_DATA.$1253/**大型精力药**/ + '）"><span class="label">' + look._I18N_DATA.$2116/**能量包信息：**/ + '</span><span><input type="text" class="text long44" id="energyPackInput" value="' + energyPackValue.replace(/(,)$/ig, "") + '"></span></div>' +
				'		<div class="publisher_row" title="' + look._I18N_DATA.$2119/**格式为：**/ + 'id:value,id:value"><span class="label">' + look._I18N_DATA.$2117/**pvp对手：**/ + '</span><span><input type="text" class="text long44" id="opponentInput" value="' + opponentValue.replace(/(,)$/ig, "") + '"></span></div>' +
				'		<div class="publisher_row" title="' + look._I18N_DATA.$2119/**格式为：**/ + 'id:value,id:value"><span class="label">' + look._I18N_DATA.$2118/**国战对手：**/ + '</span><span><input type="text" class="text long44" id="warOpponentInput" value="' + warOpponentValue.replace(/(,)$/ig, "") + '"></span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2015/**创建时间：**/ + '</span><span><input type="hidden" class="text" name="createAt" value="' + back.data.createAt + '">' + back.data.createAt + '</span></div>' +
				'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2016/**更新时间：**/ + '</span><span>' + back.data.updateAt + '</span></div>' +
				'	</div>' +
				'	<div class="publisher_cell bottom">' +
				'		<div class="subset_cell no_margin">' +
				'			<a href="javascript:" class="a_as_button comfirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
				'		</div>' +
				'	</div>' +
				'</form></div>' + 
				'<div class="clear"></div>'
			);
			
			//[事件]修改
			$(".modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]确认修改
			$(".comfirm_modify_subset").unbind("click").bind("click", function(){
				var energyPackValue = $.trim($("#energyPackInput").val()).replace(/(:)/ig, '='),
					opponentValue = $.trim($("#opponentInput").val()).replace(/(:)/ig, '='),
					warOpponentValue = $.trim($("#warOpponentInput").val()).replace(/(:)/ig, '='),
					param = $(this).parents("form").serialize();
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$886/**确定修改此玩家的pvp信息？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						empireModifyPvpInfoRequest(energyPackValue, opponentValue, warOpponentValue, param);
					}
				});
			});
		}else{
			empirePvpInfoPanel.append('<div class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</div>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> pvp信息
//* 修改callback
//*************************************
var empireModifyPvpInfoCallback = function(back){
	if(back.code == 0){
		look.showInfo.right(back.code + ":" + back.message);
		$.clearPop();
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 获取公告信息callback
//*************************************
var empireGetNoticeCallback = function(back){
	if(back.code == 0){
		if (back.data != undefined) {
			$("#noticeTextarea").val(back.data);
			publicInit.inputTipStyle(".empire_notice_panel textarea", ".empire_notice_panel label tt");
			//[事件]保存修改
			$("#modifyNoticeSubset").unbind("click").bind("click", function(){
				var notice = encodeURIComponent($.trim($("#noticeTextarea").val()));
				if(notice == back.data){look.showInfo.error(look._I18N_DATA.$483/**没有任何修改…**/);return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$826/**确定保存修改公告？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						empireModifyNoticeRequest(notice);
					}
				});
			});
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 修改公告callback
//*************************************
var empireModifyNoticeCallback = function(back){
	if(back.code == 0){
		look.showInfo.right(back.code + look._I18N_DATA.$490/**：公告修改成功！**/);
		$.clearPop();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 获取宝石信息callback
//*************************************
var empireGetJewelCallback = function(back){
	var userJewelList = $("#userJewelList");
	userJewelList.children("tr:first").nextAll().remove();
	if(publicInit.authenCheck(look._AUTHEN.misEmpire, 27)){
		$("#addJewelCell").fadeIn();
		//宝石字典
		look._EMPIRE_JEWEL_DIC_ARRAY == undefined ? Look.prototype._EMPIRE_JEWEL_DIC_ARRAY = new Array() : null;
		look._EMPIRE_JEWEL_DIC_ARRAY.length == 0 ? empireGetDictionaryRequest("jewel") : empireJewelDictionaryCallback.Assay("select");
	}
	//[事件]添加宝石
	$("#addJewelSubset").unbind("click").bind("click", function(){
		var jewelId = $("#empireJewelSelect").val();
		if(jewelId == ""){look.showInfo.error(look._I18N_DATA.$556/**请选择要添加的宝石…**/);return false;}
		$.lookPop({
			type: 2,
			title: look._I18N_DATA.$66/**提醒**/,
			html:
				'<div style="width:500px;">' +
				'	<div class="pop_content_word">' +
				'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$853/**确定要给该玩家添加{word}？**/.replace(/{word}/ig, '<b class="color_yellow">' + $("#empireJewelSelect option:selected").text() + '</b>') + '</span>' +
				'	</div>' +
				'</div>',
			confirmCallback: function(obj){
				if(obj.hasClass("a_as_disabled")){return false;}
				obj.addClass("a_as_disabled");
				empireAddJewelRequest(jewelId);
			}
		});
	});
	if(back.code == 0){
		$("#maxBagSizeCell").text((back.data.maxBagSize ? back.data.maxBagSize : "-"));
		$("#resultCount").text(back.data.list ? back.data.list.length : "-");
		if (back.data.list && back.data.list.length != 0) {
			$.each(back.data.list, function(i, list){
				userJewelList.append(
					'<tr j_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.name + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.exp + '</td>' +
					'	<td>' + list.quality + '</td>' +
					'	<td>' + list.relEquip + '</td>' +
					'	<td>' + list.createAt + '</td>' +
					'	<td>' + list.updateAt + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			userJewelList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		userJewelList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 获取祝福信息callback
//*************************************
var empireGetSpereCallback = function(back){
	var userSpereList = $("#userSpereList");
	userSpereList.children("tr:first").nextAll().remove();
	if(publicInit.authenCheck(look._AUTHEN.misEmpire, 28)){
		$("#addSpereCell").fadeIn();
		//祝福字典
		look._EMPIRE_SPERE_DIC_ARRAY == undefined ? Look.prototype._EMPIRE_SPERE_DIC_ARRAY = new Array() : null;
		look._EMPIRE_SPERE_DIC_ARRAY.length == 0 ? empireGetDictionaryRequest("spere") : empireSpereDictionaryCallback.Assay("select");
	}
	//[事件]添加祝福
	$("#addSpereSubset").unbind("click").bind("click", function(){
		var spereId = $("#empireSpereSelect").val();
		if(spereId == ""){look.showInfo.error(look._I18N_DATA.$558/**请选择要添加的祝福…**/);return false;}
		$.lookPop({
			type: 2,
			title: look._I18N_DATA.$66/**提醒**/,
			html:
				'<div style="width:500px;">' +
				'	<div class="pop_content_word">' +
				'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$853/**确定要给该玩家添加**/ + '<b class="color_yellow">' + $("#empireSpereSelect option:selected").text() + '</b>' + look._I18N_DATA.$9/**？**/ + '</span>' +
				'	</div>' +
				'</div>',
			confirmCallback: function(obj){
				if(obj.hasClass("a_as_disabled")){return false;}
				obj.addClass("a_as_disabled");
				empireAddSpereRequest(spereId);
			}
		});
	});
	if(back.code == 0){
		$("#maxBagSizeCell").text((back.data.maxBagSize ? back.data.maxBagSize : "-"));
		$("#resultCount").text(back.data.list ? back.data.list.length : "-");
		if (back.data.list && back.data.list.length != 0) {
			$.each(back.data.list, function(i, list){
				userSpereList.append(
					'<tr s_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.name + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.exp + '</td>' +
					'	<td>' + list.quality + '</td>' +
					'	<td>' + list.relHero + '</td>' +
					'	<td>' + list.createAt + '</td>' +
					'	<td>' + list.updateAt + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			userSpereList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		userSpereList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 添加宝石callback
//* 添加祝福callback
//*************************************
var empireAddSomethingCallback = function(back){
	if(back.code == 0){
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功！**/);
		$.clearPop();
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 获取资源倍率信息callback
//*************************************
var empireGetSystemConfigCallback = function(back){
	var systemConfigList = $("#systemConfigList");
	systemConfigList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text(back.data ? back.data.length : "-");
		if (back.data && back.data.length != 0) {
			$.each(back.data, function(i, list){
				systemConfigList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.type + '</td>' +
					'	<td>' + list.desc + '</td>' +
					'	<td>' + list.value + '</td>' +
					'	<td width=160px;>' + (publicInit.authenCheck(look._AUTHEN.misEmpire, 26) ? '<a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') + '</td>' +
					'</tr>' + 
					'<tr type="' + list.type + '" class="look_hidden">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.type + '</td>' +
					'	<td>' + list.desc + '</td>' +
					'	<td><input type="text" class="text" value="' + list.value + '"/></td>' +
					'	<td><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]修改信息
			$(".modify_subset").unbind("click").bind("click", function(){
				$(this).parents("tr").toggle().next().toggle().find("input.text:first").focus();
			});
			$(".cancel_subset").unbind("click").bind("click", function(){
				$(this).parents("tr").toggle().prev().toggle();
			});
			//[事件]确认修改
			$(".confirm_modify_subset").unbind("click").bind("click", function(){
				var element = $(this).parents("tr"),
					type = element.attr("type");
					value = $.trim(element.find("input").val());
				if(value == ""){look.showInfo.error(look._I18N_DATA.$538/**倍率值不能为空…**/);element.find("input").focus();return false;}
				if(isNaN(value)){look.showInfo.error(look._I18N_DATA.$539/**倍率值必须是数字**/);element.find("input").focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$848/**确定修改该倍率值？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						empireMofifySystemConfigRequest(type, value);
						obj.addClass("a_as_disabled");
					}
				});

			});
		}else{
			systemConfigList.append('<tr><td colspan="5">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		systemConfigList.append('<tr><td colspan="5">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国
//* 修改资源倍率信息callback
//*************************************
var empireMofifySystemConfigCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.data);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 国战
//* 查询主城排行榜callback
//*************************************
var empireGetSingleRankCallback = function(back){
	var multiwarInfoList = $("#multiwarInfoList");
	multiwarInfoList.empty();
	if(back.code == 0){
		if (back.data && back.data.length != 0) {
			for(x in back.data){
				var tempX = true, n = 0;
				for (y in back.data[x]) {
					$.each(back.data[x][y], function(i, list){
						n++;
					});
				}
				for (y in back.data[x]){
					var tempY = true, m = 0;
					$.each(back.data[x][y], function(i, list){
						m++;
					});
					$.each(back.data[x][y], function(i, list){
						multiwarInfoList.append(
							'<tr>' +
							(tempX ? '<td rowspan="' + n + '" style="border-right:1px solid #F1F1F1;background:#fff;">' + x + '</td>' : '') +
							(tempY ? '<td rowspan="' + m + '" style="border-right:1px solid #F1F1F1;background:#fff;">' + y + '</td>' : '') +
							'	<td>' + list.userId + '</td>' +
							'	<td>' + list.iconId + '</td>' +
							'	<td>' + list.level + '</td>' +
							'	<td>' + list.mark + '</td>' +
							'	<td>' + list.name + '</td>' +
							'	<td>' + list.rank + '</td>' +
							'</tr>');
						tempX = false; tempY = false;
					});
				}
			}
			publicInit.tabelStyle();
		}else{
			multiwarInfoList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		multiwarInfoList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 国战
//* 查询总排行榜callback
//*************************************
var empireGetTotalRankCallback = function(back){
	var multiwarInfoList = $("#multiwarInfoList");
	multiwarInfoList.empty();
	if (back.code == 0) {
		if (back.data && back.data.length != 0) {
			for (y in back.data) {
				var tempY = true, m = 0;
				$.each(back.data[y], function(i, list){
					m++;
				});
				$.each(back.data[y], function(i, list){
					multiwarInfoList.append(
						'<tr>' +
						(tempY ? '<td rowspan="' + m + '" colspan="2" style="border-right:1px solid #F1F1F1;background:#fff;">' + y + '</td>' : '') +
						'	<td>' + list.userId + '</td>' +
						'	<td>' + list.iconId + '</td>' +
						'	<td>' + list.level + '</td>' +
						'	<td>' + list.mark + '</td>' +
						'	<td>' + list.name + '</td>' +
						'	<td>' + list.rank + '</td>' +
						'</tr>');
						tempY = false;
				});
			}
			publicInit.tabelStyle();
		} else {
			multiwarInfoList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	} else {
		multiwarInfoList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 帝国 -> 国战
//* 重置国战信息callback
//*************************************
var empireResetMultiwarCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.data);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** empire_mis Callback END ***/

/*** data Callback START ***/

//*************************************
//* 数据分析中心
//* 获取数据中心所有字典callback
//*************************************
var getAllStatDicCallback = {
	Convert : function(back){
		var channelArray = new Array(), languageArray = new Array(), deviceArray = new Array();
		if(back.channel){
			if (back.channel && back.channel.length != 0) {
				$.each(back.channel, function(i){
					channelArray.push(new Array(back.channel[i].id, back.channel[i].name));
				});
			}
		}else{
			channelArray.push(new Array());
			look.showInfo.error(look._I18N_DATA.$598/**获取渠道字典失败…**/);	
		}
		look._STAT_DIC_ARRAY.push(channelArray);
		getAllStatDicCallback.AssayChannel();
		
		if(back.locale){
			$.each(back.locale, function(i){
				languageArray.push(new Array(back.locale[i].id, back.locale[i].name));
			});
		}else{
			languageArray.push(new Array());
			look.showInfo.error(look._I18N_DATA.$596/**获取语言字典失败…**/);	
		}
		look._STAT_DIC_ARRAY.push(languageArray);
		getAllStatDicCallback.AssayLanguage();
		
		if(back.dtype){
			$.each(back.dtype, function(i){
				deviceArray.push(new Array(back.dtype[i].id, back.dtype[i].name));
			});
		}else{
			deviceArray.push(new Array());
			look.showInfo.error(look._I18N_DATA.$597/**获取设备字典失败…**/);	
		}
		look._STAT_DIC_ARRAY.push(deviceArray);
		getAllStatDicCallback.AssayDevice();
	},
	AssayChannel : function(){
		if (look._STAT_DIC_ARRAY[0].length != 0) {
			$("#channelSelect").children().first().nextAll().remove();
			$("#contrastChannelSelect").children().first().nextAll().remove();
			$.map(look._STAT_DIC_ARRAY[0], function(n){
				$("#channelSelect,#contrastChannelSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
			});
			$("#channelSelect option[value='" + look.getHashParam("channel") + "']").attr("selected", "selected");
		}
	},
	AssayLanguage : function(){
		if (look._STAT_DIC_ARRAY[1].length != 0) {
			$("#languageSelect").children().first().nextAll().remove();
			$("#contrastLanguageSelect").children().first().nextAll().remove();
			$.map(look._STAT_DIC_ARRAY[1], function(n){
				$("#languageSelect,#contrastLanguageSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
			});
			$("#languageSelect option[value='" + look.getHashParam("language") + "']").attr("selected", "selected");
		}
	},
	AssayDevice : function(){
		if (look._STAT_DIC_ARRAY[2].length != 0) {
			$("#deviceSelect").children().first().nextAll().remove();
			$("#contrastDeviceSelect").children().first().nextAll().remove();
			$.map(look._STAT_DIC_ARRAY[2], function(n){
				$("#deviceSelect,#contrastDeviceSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
			});
			$("#deviceSelect option[value='" + look.getHashParam("device") + "']").attr("selected", "selected");
		}
	}
}

//*************************************
//* 数据分析中心
//* 获取数据中心收入情况字典callback
//*************************************
var getIncomeDicCallback = {
	Convert: function(back){
		if(back.code == 0){
			var channelArray = new Array(), deviceTypeArray = new Array(), localeArray = new Array();
			if(back.data.channel){
				$.each(back.data.channel, function(i){
					channelArray.push(new Array(back.data.channel[i].value, back.data.channel[i].key));
				});
			}else{
				look.showInfo.error(look._I18N_DATA.$598/**获取渠道字典失败…**/);
			}
			look._STAT_INCOME_DIC_ARRAY.push(channelArray);
			getIncomeDicCallback.AssayChannel();
			
			if(back.data.deviceType){
				$.each(back.data.deviceType, function(i){
					deviceTypeArray.push(new Array(back.data.deviceType[i], back.data.deviceType[i]));
				});
			}else{
				look.showInfo.error(look._I18N_DATA.$597/**获取设备字典失败…**/);
			}
			look._STAT_INCOME_DIC_ARRAY.push(deviceTypeArray);
			getIncomeDicCallback.AssayDeviceType();
			
			if(back.data.locale){
				$.each(back.data.locale, function(i){
					localeArray.push(new Array(back.data.locale[i], back.data.locale[i]));
				});
			}else{
				look.showInfo.error(look._I18N_DATA.$596/**获取语言字典失败…**/);
			}
			look._STAT_INCOME_DIC_ARRAY.push(localeArray);
			getIncomeDicCallback.AssayLocale();
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	AssayChannel: function(callback){
		if (look._STAT_INCOME_DIC_ARRAY[0].length != 0) {
			if(!($("#channelSelect").length == 0 && $("#contrastChannelSelect").length == 0)){
				$("#channelSelect").children().first().nextAll().remove();
				$("#contrastChannelSelect").children().first().nextAll().remove();
				$.map(look._STAT_INCOME_DIC_ARRAY[0], function(n){
					$("#channelSelect,#contrastChannelSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
				});
				$("#channelSelect option[value='" + look.getHashParam("channel") + "']").attr("selected", "selected");
				$("#contrastChannelSelect option[value='" + look.getHashParam("c_channel") + "']").attr("selected", "selected");
			}
			//checkbox
			if($("#channelCheckbox").length != 0){
				$("#channelCheckbox").children().remove();
				$.map(look._STAT_INCOME_DIC_ARRAY[0], function(n){
					$("#channelCheckbox").append('<a href="javascript:" class="a_as_checkbox look_box_corner" c_id="' + n[0] + '"><em>' + n[1] + '</em></a>');
				});
				publicInit.checkboxStyle("#channelCheckbox");
			}
			//详情里的channel替换
			if(("#incomeDetailPoperList").length != 0){
				$.map(look._STAT_INCOME_DIC_ARRAY[0], function(n){
					$("#incomeDetailPoperList tr").each(function(i){
						var obj = $(this).children("td").eq(2);
						if(obj.attr("c_id") == n[0]){obj.text(n[1]);}
					});
				});
			}
			typeof(callback) == "function" ? callback() : null;
		}
	},
	AssayDeviceType: function(){
		if (look._STAT_INCOME_DIC_ARRAY[1].length != 0) {
			$("#deviceTypeSelect").children().first().nextAll().remove();
			$("#contrastDeviceTypeSelect").children().first().nextAll().remove();
			$.map(look._STAT_INCOME_DIC_ARRAY[1], function(n){
				$("#deviceTypeSelect,#contrastDeviceTypeSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
			});
			$("#deviceTypeSelect option[value='" + look.getHashParam("device_type") + "']").attr("selected", "selected");
		}
	},
	AssayLocale: function(){
		if (look._STAT_INCOME_DIC_ARRAY[2].length != 0) {
			$("#localeSelect").children().first().nextAll().remove();
			$("#contrastLocaleSelect").children().first().nextAll().remove();
			$.map(look._STAT_INCOME_DIC_ARRAY[2], function(n){
				$("#localeSelect,#contrastLocaleSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
			});
			$("#localeSelect option[value='" + look.getHashParam("locale") + "']").attr("selected", "selected");
		}
	}
}

//*************************************
//* 数据分析中心
//* 获取“报表”字典callback
//*************************************
var getStatementDicCallback = {
	Convert : function(back){
		if(back.length != 0){
			look._STATEMENT_DIC_ARRAY = JSON.stringify(back);
			getStatementDicCallback.Assay();
			$("#siftCell").show();
			$("#resultLoader").hide();
		}else{
			look._STATEMENT_DIC_ARRAY = null;
			look.showInfo.error(look._I18N_DATA.$596/**获取报表字典失败…**/);	
		}
	},
	Assay : function(){
		if (look._STATEMENT_DIC_ARRAY.length != 0) {
			var data = $.parseJSON(look._STATEMENT_DIC_ARRAY),
				siftElement = $("#siftElementSelect");
			function joinFn(){
				var appid = $("#appIdSelect").val(),
					serverId = $("#serverIdSelect").val();
				appid == "" ? siftElement.empty().hide() : siftElement.empty().show();
				$.each(data, function(i){
					if(data[i].appid == appid && data[i].serverid == serverId){
						$.each(data[i].list, function(j){
							siftElement.append('<option value="' + data[i].list[j].type + '">' + data[i].list[j].name + '</option>');
						});
					}
				});
			}
			//[事件]
			$("select.generated").bind("change", function(){
				joinFn();
			});
			joinFn();
		}
	}
}

//*************************************
//* 数据分析中心 -> 注释
//* 添加注释callback
//*************************************
var addStatementCommentCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + ":" + back.message);
		$("#commentContent").val("");
		$("#commentAddTr").slideUp();
		initLoader.reloadAnalysisLoader(look._TEMP_DATE.replace(/-/g, ""));
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var addStatementCommentComplete = function(){
	$("#addCommentSubset").removeClass("a_as_disabled");
}

//*************************************
//* 数据分析中心 -> 获取注释列表callback
//*************************************
var getStatementCommentCallback = function(back){
	if (back.code == 0) {
		$("#commentList").children("tr:first").nextAll().remove();
		if (back.comment.length != 0) {
			$.each(back.comment, function(i){
				$("#commentList").append(
					'<tr>' +
					'	<td>' + back.comment[i].dt + '</td>' +
					'	<td>' + back.comment[i].info + '</td>' +
					'	<td>' + back.comment[i].author + '</td>' +
					'	<td>' + (!publicInit.authenCheck(look._AUTHEN.da, 5) ? '<a href="javascript:" class="a_as_button a_as_green modify_comment_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : 'N/A') + '</td>' +
					'</tr>' +
					'<tr c_id="' + back.comment[i].id + '" class="hidden">' +
					'	<td><input type="text" class="text disabled modify_comment_date" readonly="readonly" value="' + back.comment[i].dt + '" /></td>' +
					'	<td colspan="2"><input type="text" class="text comment_content modify_comment_content" value="' + back.comment[i].info + '" /></td>' +
					'	<td><a href="javascript:" class="a_as_button comfirm_modify_comment_subset">' + look._I18N_DATA.$659/**确认修改**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_modify_comment_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			$(".modify_comment_date").datepicker({ minDate: $("#dataStart").val(), maxDate: $("#dataEnd").val() });
			//[事件]修改注释
			$(".modify_comment_subset").unbind("click").bind("click", function(){
				$(this).parents("tr").hide().next("tr").show().find(".modify_comment_content").focus();
			});
			//[事件]取消修改
			$(".cancel_modify_comment_subset").unbind("click").bind("click", function(){
				$(this).parents("tr").hide().prev("tr").show();
			});
			//[事件]确认修改注释
			$(".comfirm_modify_comment_subset").unbind("click").bind("click", function(){
				var commentId = $(this).parents("tr").attr("c_id"),
					modifyCommentContent = $.trim($(this).parents("tr").find(".modify_comment_content").val()),
					prevCommentConent = $(this).parents("tr").prev("tr").children("td").eq(1).text(),
					modifyCommentDate =  $(this).parents("tr").find(".modify_comment_date").val(),
					prevCommentDate = $(this).parents("tr").prev("tr").children("td").eq(0).text();
				if(modifyCommentContent == ""){look.showInfo.error(look._I18N_DATA.$7000/**注释内容不能为空…**/);$(this).parents("tr").find(".modify_comment_content").focus();return false;}
				if(modifyCommentContent == prevCommentConent && modifyCommentDate == prevCommentDate){look.showInfo.error(look._I18N_DATA.$7001/**未作任何修改…**/);return false;}
				Look.prototype._TEMP_MODIFY_DATE = modifyCommentDate;
				modifyStatementCommentRequest(commentId, modifyCommentDate.replace(/-/g, ""), modifyCommentContent);
			});
		}else{
			$("#commentList").append('<tr><td colspan="4">' + look._I18N_DATA.$5106/**糟糕！谁删了注释？…**/ + '</td></tr>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 数据分析中心 -> 修改注释callback
//*************************************
var modifyStatementCommentCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + ":" + back.message);
		initLoader.reloadAnalysisLoader(look._TEMP_MODIFY_DATE.replace(/-/g, ""));
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 数据分析中心 -> 活跃用户分析callback
//*************************************
var getVivaceUserAnalysisCallback = {
	Convert : function(){
		var chartData = new Array(),
			dataChartLength = $("#dataChartSift a").length,
			onId = $("#dataChartSift a.on").attr("t_id").toLowerCase();
		
		curveChart.chartData.length = 0;
		function convertData(tArray){
			if (tArray) {
				var dataArray = new Array();
				for (var j = 0; j < tArray.length; j++) {
					if(onId == "dau"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).dau));
					}else if(onId == "mau"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).mau));
					}else if(onId == "wau"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).wau));
					}else if(onId == "login"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).login));
					}
				}
				curveChart.chartData.push(dataArray);
			}
		}
		convertData(look._USER_TEMP_ARRAY);
		if ($("#contrastCheckbox").is(":checked")) {
			convertData(look._USER_CONTRAST_ARRAY);
		}
		curveChart.draw();
	},
	Assay : function(back){
		if(back.code == 0){
			$("#vivaceUserAnalysisList").children("tr:first").nextAll().remove();
			if(back.list.length != 0){
				var arr;
				$.each(back.list, function(i){
					var dauIncreaseHtml = "", mauIncreaseHtml = "", wauIncreaseHtml = "";
					if(parseFloat(back.list[i].dau.increase) > 0){
						dauIncreaseHtml += '<b class="color_red">' + back.list[i].dau.increase + '%</b>';
					}else if (parseFloat(back.list[i].dau.increase) < 0) {
						dauIncreaseHtml += '<b class="color_green">' + back.list[i].dau.increase + '%</b>';
					}else{
						dauIncreaseHtml += '<b>/</b>';
					}
					if(parseFloat(back.list[i].mau.increase) > 0){
						mauIncreaseHtml += '<b class="color_red">' + back.list[i].mau.increase + '%</b>';
					}else if (parseFloat(back.list[i].mau.increase) < 0) {
						mauIncreaseHtml += '<b class="color_green">' + back.list[i].mau.increase + '%</b>';
					}else{
						mauIncreaseHtml += '<b>/</b></td>';
					}
					if(parseFloat(back.list[i].wau.increase) > 0){
						wauIncreaseHtml += '<b class="color_red">' + back.list[i].wau.increase + '%</b>';
					}else if (parseFloat(back.list[i].wau.increase) < 0) {
						wauIncreaseHtml += '<b class="color_green">' + back.list[i].wau.increase + '%</b>';
					}else{
						wauIncreaseHtml += '<b>/</b>';
					}
					$("#vivaceUserAnalysisList").append(
						'<tr>' +
						'	<td>' + back.list[i].dt + '</td>' +
						'	<td>' + back.list[i].dau.value + '</td>' +
						'	<td>' + dauIncreaseHtml + '</td>' +
						'	<td>' + back.list[i].wau.value + '</td>' +
						'	<td>' + wauIncreaseHtml + '</td>' +
						'	<td>' + back.list[i].mau.value + '</td>' +
						'	<td>' + mauIncreaseHtml + '</td>' +
						'	<td><b>' + (parseFloat(back.list[i].dau.value / back.list[i].mau.value) * 100).toFixed(3) + '%</b></td>' +
						'	<td>' + back.list[i].login.total + '</td>' +
						'	<td><b>' + back.list[i].login.avg + '</b></td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				getVivaceUserAnalysisCallback.Combine(back);
			}else{
				$("#vivaceUserAnalysisList").append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine : function(back){
		if (back.code == 0) {
			if (back.list.length != 0) {
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.list, function(i){
						look._USER_CONTRAST_ARRAY.push(
							'{"date":' + (new Date(Date.parse(back.list[i].dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"dau":' + parseFloat(back.list[i].dau.value) +
							',"mau":' + parseFloat(back.list[i].mau.value) +
							',"wau":' + parseFloat(back.list[i].wau.value) +
							',"login":' + parseFloat(back.list[i].login.total) + '}'
						);
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.list, function(i){
						look._USER_TEMP_ARRAY.push(
							'{"date":' + (new Date(Date.parse(back.list[i].dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"dau":' + parseFloat(back.list[i].dau.value) +
							',"mau":' + parseFloat(back.list[i].mau.value) +
							',"wau":' + parseFloat(back.list[i].wau.value) +
							',"login":' + parseFloat(back.list[i].login.total) + '}'
						);
					});
					if (back.comment.length != 0) {
						$.each(back.comment, function(j){
							$.each(back.list, function(i){
								if (back.list[i].dt == back.comment[j].dt) {
									curveChart.commentData.push(i);
								}
							});
						});
					}
				}
				getVivaceUserAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 新增用户分析callback
//*************************************
var getNewUserAnalysisCallback = {
	Convert : function(){
		var chartData = new Array(),
			dataChartLength = $("#dataChartSift a").length,
			onId = $("#dataChartSift a.on").attr("t_id").toLowerCase();
		
		curveChart.chartData.length = 0;
		function convertData(tArray){
			if (tArray) {
				var dataArray = new Array();
				for (var j = 0; j < tArray.length; j++) {
					if (onId == "daily") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).daily));
					}else if (onId == "daily_effect") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).daily_effect));
					}else if (onId == "weekly") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).weekly));
					}else if (onId == "weekly_effect") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).weekly_effect));
					}else  if (onId == "monthly") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).monthly));
					}else  if (onId == "monthly_effect") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).monthly_effect));
					}
				}
				curveChart.chartData.push(dataArray);
			}
		}
		convertData(look._USER_TEMP_ARRAY);
		if ($("#contrastCheckbox").is(":checked")) {
			convertData(look._USER_CONTRAST_ARRAY);
		}
		curveChart.draw();
	},
	Assay : function(back, textStatus, listElement){
		var listElement = listElement ? listElement : $("#newUserAnalysisList");
		if(back.code == 0){
			listElement.empty();
			if(back.list.length != 0){
				var listHtml = "", arr;
				$.each(back.list, function(i, list){
					var dailyIncreaseHtml = "", weeklyIncreaseHtml = "", monthlyIncreaseHtml = "";
					if(parseFloat(list.daily.increase) > 0){
						dailyIncreaseHtml += '<b class="color_red">' + list.daily.increase + '%</b>';
					}else if (parseFloat(list.daily.increase) < 0) {
						dailyIncreaseHtml += '<b class="color_green">' + list.daily.increase + '%</b>';
					}else{
						dailyIncreaseHtml += '<b>/</b>';
					}
					if(parseFloat(list.weekly.increase) > 0){
						weeklyIncreaseHtml += '<b class="color_red">' + list.weekly.increase + '%</b>';
					}else if (parseFloat(list.weekly.increase) < 0) {
						weeklyIncreaseHtml += '<b class="color_green">' + list.weekly.increase + '%</b>';
					}else{
						weeklyIncreaseHtml += '<b>/</b></td>';
					}
					if(parseFloat(list.monthly.increase) > 0){
						monthlyIncreaseHtml += '<b class="color_red">' + list.monthly.increase + '%</b>';
					}else if (parseFloat(list.monthly.increase) < 0) {
						monthlyIncreaseHtml += '<b class="color_green">' + list.monthly.increase + '%</b>';
					}else{
						monthlyIncreaseHtml += '<b>/</b>';
					}
					listElement.append(
						'<tr>' +
						'	<td>' + list.dt + '</td>' +
						'	<td>' + list.daily.value + '</td>' +
						'	<td>' + list.daily.effect + '</td>' +
						'	<td>' + dailyIncreaseHtml + '</td>' +
						'	<td>' + list.weekly.value + '</td>' +
						'	<td>' + list.weekly.effect + '</td>' +
						'	<td>' + weeklyIncreaseHtml + '</td>' +
						'	<td>' + list.monthly.value + '</td>' +
						'	<td>' + list.monthly.effect + '</td>' +
						'	<td>' + monthlyIncreaseHtml + '</td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				getNewUserAnalysisCallback.Combine(back);
			}else{
				listElement.append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine : function(back){
		if (back.code == 0) {
			if (back.list.length != 0) {
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.list, function(i, list){
						look._USER_CONTRAST_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"daily":' + parseFloat(list.daily.value) +
							',"daily_effect":' + parseFloat(list.daily.effect == null ? 0 : list.daily.effect) +
							',"weekly":' + parseFloat(list.weekly.value) +
							',"weekly_effect":' + parseFloat(list.weekly.effect == null ? 0 : list.weekly.effect) +
							',"monthly":' + parseFloat(list.monthly.value) + 
							',"monthly_effect":' + parseFloat(list.monthly.effect == null ? 0 : list.monthly.effect) + '}'
						);
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.list, function(i, list){
						look._USER_TEMP_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"daily":' + parseFloat(list.daily.value) +
							',"daily_effect":' + parseFloat(list.daily.effect == null ? 0 : list.daily.effect) +
							',"weekly":' + parseFloat(list.weekly.value) +
							',"weekly_effect":' + parseFloat(list.weekly.effect == null ? 0 : list.weekly.effect) +
							',"monthly":' + parseFloat(list.monthly.value) + 
							',"monthly_effect":' + parseFloat(list.monthly.effect == null ? 0 : list.monthly.effect) + '}'
						);
					});
					if (back.comment.length != 0) {
						$.each(back.comment, function(j){
							$.each(back.list, function(i){
								if (back.list[i].dt == back.comment[j].dt) {
									curveChart.commentData.push(i);
								}
							});
						});
					}
				}
				getNewUserAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 用户留存分析callback
//*************************************
var getRetentionUserAnalysisCallback = {
	Convert : function(){
		var chartData = new Array(),
			dataChartLength = $("#dataChartSift a").length,
			onIndex = $("#dataChartSift a.on").index() == -1 ? 0 : $("#dataChartSift a.on").index();
		
		curveChart.chartData.length = 0;
		function convertData(tArray){
			if (tArray) {
				var dataArray = new Array();
				for (var j = 0; j < tArray.length; j++) {
					if (j % dataChartLength == onIndex) {
						dataArray.push(tArray[j]);
					}
				}
				curveChart.chartData.push(dataArray);
			}
		}
		convertData(look._USER_TEMP_ARRAY);
		if ($("#contrastCheckbox").is(":checked")) {
			convertData(look._USER_CONTRAST_ARRAY);
		}
		curveChart.draw();
	},
	Assay : function(back, textStatus, listElement){
		var listElement = listElement ? listElement : $("#retentionUserAnalysisList");
		if(back.code == 0){
			listElement.empty();
			$("#dataChartSift").empty()
			if(back.list.length != 0){
				var listHtml = '<tr><th>' + look._I18N_DATA.$1127/**日期**/ + '</th>', arr;
				
				$.each(back.key, function(i){
					listHtml += '<th>' + back.key[i] + look._I18N_DATA.$1134/**日留存率**/ + '</th>';
					$("#dataChartSift").append('<a href="javascript:" class="shadow" t_id="' + back.key[i] + '">' + back.key[i] + look._I18N_DATA.$1135/**日留存**/ + '</a>');
				});
				
				listHtml += '</tr>';
				
				$.each(back.list,function(i){
					if(i % back.key.length == 0){
						listHtml += "<tr>";
						listHtml += '<td>' + back.list[i].dt + '</td>';
					}
					listHtml += '<td><b>' + back.list[i].rate + '%</b></td>';
					if (i % back.key.length == back.key.length) {
						listHtml += "</tr>";
					}
				});
				listElement.append(listHtml);
				publicInit.tabelStyle();
				
				getRetentionUserAnalysisCallback.Combine(back);
				
				//[事件]图表切换按钮
				$("#dataChartSift a").unbind("click").bind("click",function(){
					$(this).addClass("on").siblings().removeClass("on");
					getRetentionUserAnalysisCallback.Convert();
				}).first().addClass("on");
			}else{
				listElement.append('<tr><td>' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine : function(back){
		if (back.code == 0) {
			if (back.list.length != 0) {
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.list, function(i){
						look._USER_CONTRAST_ARRAY.push(new Array(new Date(Date.parse(back.list[i].dt.replace(/\-/g,"/"))).getTime() + 28800000, parseFloat(back.list[i].rate)));
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.list, function(i){
						look._USER_TEMP_ARRAY.push(new Array(new Date(Date.parse(back.list[i].dt.replace(/\-/g,"/"))).getTime() + 28800000, parseFloat(back.list[i].rate)));
					});
				}
				getRetentionUserAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 版本情况分析callback
//*************************************
var getSystemVersionAnalysisCallback = {
	Convert: function(){
		var totalCell = $("#systemVersionAnalysisList").children().first(), totalHtml = '<tr class="total"><td><b>total</b></td>';
		
		stackChart.chartData.length = 0;
		$("#chartLabelCell").empty();
		stackChart.chartData.push(look._USER_TEMP_ARRAY);
		if($("#contrastCheckbox").is(":checked")){
			stackChart.chartData.push(look._USER_CONTRAST_ARRAY);
			$.map(look._USER_CONTRAST_ARRAY, function(n){
				totalHtml += '<td><b>' + n[1] + '</b></td>';
			});
			$("#chartLabelCell").append(
				'<ul>' +
				'	<li><b>' + look._I18N_DATA.$1132/**对比数据**/ + '</b></li>' +
				'	<li>' + look._I18N_DATA.$2045/**日期：**/ + $("#contrastDateStart").val() + ' ' + look._I18N_DATA.$22/**至**/ + ' ' + look.dateFormat(look.addDaysByDate($("#contrastDateStart").val(), look.getDiffDays($("#dataStart").val(), $("#dataEnd").val())), "yyyy-MM-dd") + '</li>' +
				'	<li>' + look._I18N_DATA.$2076/**应用：**/ + $("#contrastAppSelect option:selected").text() + '</li>' +
				'	<li>' + look._I18N_DATA.$2077/**地区：**/ + $("#contrastAreaSelect option:selected").text() + '</li>' +
				'</ul>'
			);
		}else{
			$.map(look._USER_TEMP_ARRAY, function(n){
				totalHtml += '<td><b>' + n[1] + '</b></td>';
			});
		}
		totalCell.after(totalHtml + '</tr>');
		stackChart.draw();
	},
	Assay: function(back){
		if(back.code == 0){
			$("#systemVersionAnalysisList").empty();
			if(back.list.length != 0){
				var listHtml = '<tr><th>' + look._I18N_DATA.$1127/**日期**/ + ' \\ ' + look._I18N_DATA.$1133/**版本**/ + '</th>', arr;
				
				$.each(back.key, function(i){
					listHtml += '<th>' + back.key[i] + '</th>';
				});
				
				listHtml += '</tr>';
				
				$.each(back.list, function(i){
					if(i % back.key.length == 0){
						listHtml += "<tr>";
						listHtml += '<td>' + back.list[i].dt + '</td>';
					}
					listHtml += '<td><b>' + back.list[i].number + '</b></td>';
					if (i % back.key.length == back.key.length) {
						listHtml += "</tr>";
					}
				});
				$("#systemVersionAnalysisList").append(listHtml);
				publicInit.tabelStyle();
				
				getSystemVersionAnalysisCallback.Combine(back);
			}else{
				$("#systemVersionAnalysisList").append('<tr><td>' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine: function(back){
		if (back.code == 0) {
			if (back.list.length != 0) {
				var listHtml = "", arr;
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.key, function(i){
						var numberTotal = 0;
						$.each(back.list, function(j){
							if(back.list[j].osver == back.key[i]){
								var number = back.list[j].number;
								back.list[j].number == "-" ? number = 0 : number = back.list[j].number;
								numberTotal += parseFloat(number);
							}
						});
						look._USER_CONTRAST_ARRAY.push(new Array(back.key[i], numberTotal));
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.key, function(i){
						var numberTotal = 0;
						$.each(back.list, function(j){
							if(back.list[j].osver == back.key[i]){
								var number = back.list[j].number;
								back.list[j].number == "-" ? number = 0 : number = back.list[j].number;
								numberTotal += parseFloat(number);
							}
						});
						look._USER_TEMP_ARRAY.push(new Array(back.key[i], numberTotal));
					});
				}
				getSystemVersionAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 设备情况分析callback
//*************************************
var getDeviceTypeAnalysisCallback = {
	Convert: function(){
		var totalCell = $("#deviceTypeAnalysisList").children().first(), totalHtml = '<tr class="total"><td><b>total</b></td>';
		stackChart.chartData.length = 0;
		$("#chartLabelCell").empty();
		$(".total").remove();
		stackChart.chartData.push(look._USER_TEMP_ARRAY);
		if($("#contrastCheckbox").is(":checked")){
			stackChart.chartData.push(look._USER_CONTRAST_ARRAY);
			$.map(look._USER_CONTRAST_ARRAY, function(n){
				totalHtml += '<td><b>' + n[1] + '</b></td>';
			});
			$("#chartLabelCell").html(
				'<ul>' +
				'	<li><b>' + look._I18N_DATA.$1132/**对比数据**/ + '</b></li>' +
				'	<li>' + look._I18N_DATA.$2045/**日期：**/ + $("#contrastDateStart").val() + ' ' + look._I18N_DATA.$22/**至**/ + ' ' + look.dateFormat(look.addDaysByDate($("#contrastDateStart").val(), look.getDiffDays($("#dataStart").val(), $("#dataEnd").val())), "yyyy-MM-dd") + '</li>' +
				'	<li>' + look._I18N_DATA.$2076/**应用：**/ + $("#contrastAppSelect option:selected").text() + '</li>' +
				'	<li>' + look._I18N_DATA.$2077/**地区：**/ + $("#contrastAreaSelect option:selected").text() + '</li>' +
				'</ul>'
			);
			
		}else{
			$.map(look._USER_TEMP_ARRAY, function(n){
				totalHtml += '<td><b>' + n[1] + '</b></td>';
			});
		}
		totalCell.after(totalHtml + '</tr>');
		stackChart.draw();
	},
	Assay: function(back){
		if(back.code == 0){
			$("#deviceTypeAnalysisList").empty();
			if(back.list.length != 0){
				var listHtml = '<tr><th>' + look._I18N_DATA.$1127/**日期**/ + ' \\ ' + look._I18N_DATA.$705/**设备**/ + '</th>', arr;
				
				$.each(back.key, function(i){
					listHtml += '<th>' + back.key[i] + '</th>';
				});
				
				listHtml += '</tr>';
				
				$.each(back.list, function(i){
					if(i % back.key.length == 0){
						listHtml += "<tr>";
						listHtml += '<td>' + back.list[i].dt + '</td>';
					}
					listHtml += '<td><b>' + back.list[i].number + '</b></td>';
					if (i % back.key.length == back.key.length) {
						listHtml += "</tr>";
					}
				});
				$("#deviceTypeAnalysisList").append(listHtml);
				publicInit.tabelStyle();
				
				getDeviceTypeAnalysisCallback.Combine(back);
			}else{
				$("#deviceTypeAnalysisList").append('<tr><td>' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine: function(back){
		if (back.code == 0) {
			if (back.list.length != 0) {
				var listHtml = "", arr;
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.key, function(i){
						var numberTotal = 0;
						$.each(back.list, function(j){
							if(back.list[j].dtype == back.key[i]){
								var number = back.list[j].number;
								back.list[j].number == "-" ? number = 0 : number = back.list[j].number;
								numberTotal += parseFloat(number);
							}
						});
						look._USER_CONTRAST_ARRAY.push(new Array(back.key[i], numberTotal));
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.key, function(i){
						var numberTotal = 0;
						$.each(back.list, function(j){
							if(back.list[j].dtype == back.key[i]){
								var number = back.list[j].number;
								back.list[j].number == "-" ? number = 0 : number = back.list[j].number;
								numberTotal += parseFloat(number);
							}
						});
						look._USER_TEMP_ARRAY.push(new Array(back.key[i], numberTotal));
					});
				}
				getDeviceTypeAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 活跃设备分析callback
//*************************************
var getVivaceDeviceAnalysisCallback = {
	Convert : function(){
		var chartData = new Array(),
			dataChartLength = $("#dataChartSift a").length,
			onId = $("#dataChartSift a.on").attr("t_id").toLowerCase();
		curveChart.chartData.length = 0;
		function convertData(tArray){
			if (tArray) {
				var dataArray = new Array();
				for (var j = 0; j < tArray.length; j++) {
					if(onId == "dad"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).dad));
					}else if(onId == "mad"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).mad));
					}else if(onId == "wad"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).wad));
					}else if(onId == "login"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).login));
					}
				}
				curveChart.chartData.push(dataArray);
			}
		}
		convertData(look._USER_TEMP_ARRAY);
		if ($("#contrastCheckbox").is(":checked")) {
			convertData(look._USER_CONTRAST_ARRAY);
		}
		curveChart.draw();
	},
	Assay : function(back){
		var vivaceDeviceAnalysisList = $("#vivaceDeviceAnalysisList");
		if(back.code == 0){
			vivaceDeviceAnalysisList.children("tr:first").nextAll().remove();
			if(back.list.length != 0){
				var arr;
				$.each(back.list, function(i, list){
					var dauIncreaseHtml = "", mauIncreaseHtml = "", wauIncreaseHtml = "";
					if(parseFloat(list.daily.increase) > 0){
						dauIncreaseHtml += '<b class="color_red">' + list.daily.increase + '%</b>';
					}else if (parseFloat(list.daily.increase) < 0) {
						dauIncreaseHtml += '<b class="color_green">' + list.daily.increase + '%</b>';
					}else{
						dauIncreaseHtml += '<b>/</b>';
					}
					if(parseFloat(list.monthly.increase) > 0){
						mauIncreaseHtml += '<b class="color_red">' + list.monthly.increase + '%</b>';
					}else if (parseFloat(list.monthly.increase) < 0) {
						mauIncreaseHtml += '<b class="color_green">' + list.monthly.increase + '%</b>';
					}else{
						mauIncreaseHtml += '<b>/</b></td>';
					}
					if(parseFloat(list.weekly.increase) > 0){
						wauIncreaseHtml += '<b class="color_red">' + list.weekly.increase + '%</b>';
					}else if (parseFloat(list.weekly.increase) < 0) {
						wauIncreaseHtml += '<b class="color_green">' + list.weekly.increase + '%</b>';
					}else{
						wauIncreaseHtml += '<b>/</b>';
					}
					vivaceDeviceAnalysisList.append(
						'<tr>' +
						'	<td>' + list.dt + '</td>' +
						'	<td>' + list.daily.value + '</td>' +
						'	<td>' + dauIncreaseHtml + '</td>' +
						'	<td>' + list.weekly.value + '</td>' +
						'	<td>' + wauIncreaseHtml + '</td>' +
						'	<td>' + list.monthly.value + '</td>' +
						'	<td>' + mauIncreaseHtml + '</td>' +
						'	<td><b>' + (parseFloat(list.daily.value / list.monthly.value) * 100).toFixed(3) + '%</b></td>' +
						'	<td>' + list.login.total + '</td>' +
						'	<td><b>' + list.login.avg + '</b></td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				getVivaceDeviceAnalysisCallback.Combine(back);
			}else{
				vivaceDeviceAnalysisList.append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine : function(back){
		if (back.code == 0) {
			if (back.list.length != 0) {
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.list, function(i, list){
						look._USER_CONTRAST_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"dad":' + parseFloat(list.daily.value) +
							',"mad":' + parseFloat(list.monthly.value) +
							',"wad":' + parseFloat(list.weekly.value) +
							',"login":' + parseFloat(list.login.total) + '}'
						);
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.list, function(i, list){
						look._USER_TEMP_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"dad":' + parseFloat(list.daily.value) +
							',"mad":' + parseFloat(list.monthly.value) +
							',"wad":' + parseFloat(list.weekly.value) +
							',"login":' + parseFloat(list.login.total) + '}'
						);
					});
				}
				getVivaceDeviceAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 新增设备分析callback
//*************************************
var getNewDeviceAnalysisCallback = {
	Convert : function(){
		var chartData = new Array(),
			dataChartLength = $("#dataChartSift a").length,
			onId = $("#dataChartSift a.on").attr("t_id").toLowerCase();
		
		curveChart.chartData.length = 0;
		function convertData(tArray){
			if (tArray) {
				var dataArray = new Array();
				for (var j = 0; j < tArray.length; j++) {
					if (onId == "daily") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).daily));
					}else if (onId == "weekly") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).weekly));
					}else if (onId == "monthly") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).monthly));
					}
				}
				curveChart.chartData.push(dataArray);
			}
		}
		convertData(look._USER_TEMP_ARRAY);
		if ($("#contrastCheckbox").is(":checked")) {
			convertData(look._USER_CONTRAST_ARRAY);
		}
		curveChart.draw();
	},
	Assay : function(back, textStatus){
		var listElement = $("#newDeviceAnalysisList");
		if(back.code == 0){
			listElement.empty();
			if(back.list.length != 0){
				var listHtml = "", arr;
				$.each(back.list, function(i, list){
					var dailyIncreaseHtml = "", weeklyIncreaseHtml = "", monthlyIncreaseHtml = "";
					if(parseFloat(list.daily.increase) > 0){
						dailyIncreaseHtml += '<b class="color_red">' + list.daily.increase + '%</b>';
					}else if (parseFloat(list.daily.increase) < 0) {
						dailyIncreaseHtml += '<b class="color_green">' + list.daily.increase + '%</b>';
					}else{
						dailyIncreaseHtml += '<b>/</b>';
					}
					if(parseFloat(list.weekly.increase) > 0){
						weeklyIncreaseHtml += '<b class="color_red">' + list.weekly.increase + '%</b>';
					}else if (parseFloat(list.weekly.increase) < 0) {
						weeklyIncreaseHtml += '<b class="color_green">' + list.weekly.increase + '%</b>';
					}else{
						weeklyIncreaseHtml += '<b>/</b></td>';
					}
					if(parseFloat(list.monthly.increase) > 0){
						monthlyIncreaseHtml += '<b class="color_red">' + list.monthly.increase + '%</b>';
					}else if (parseFloat(list.monthly.increase) < 0) {
						monthlyIncreaseHtml += '<b class="color_green">' + list.monthly.increase + '%</b>';
					}else{
						monthlyIncreaseHtml += '<b>/</b>';
					}
					listElement.append(
						'<tr>' +
						'	<td>' + list.dt + '</td>' +
						'	<td>' + list.daily.value + '</td>' +
						'	<td>' + dailyIncreaseHtml + '</td>' +
						'	<td>' + list.weekly.value + '</td>' +
						'	<td>' + weeklyIncreaseHtml + '</td>' +
						'	<td>' + list.monthly.value + '</td>' +
						'	<td>' + monthlyIncreaseHtml + '</td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				getNewUserAnalysisCallback.Combine(back);
			}else{
				listElement.append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine : function(back){
		if (back.code == 0) {
			if (back.list.length != 0) {
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.list, function(i, list){
						look._USER_CONTRAST_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"daily":' + parseFloat(list.daily.value) +
							',"weekly":' + parseFloat(list.weekly.value) +
							',"monthly":' + parseFloat(list.monthly.value) + '}'
						);
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.list, function(i, list){
						look._USER_TEMP_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"daily":' + parseFloat(list.daily.value) +
							',"weekly":' + parseFloat(list.weekly.value) +
							',"monthly":' + parseFloat(list.monthly.value) + '}'
						);
					});
				}
				getNewUserAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 设备留存分析callback
//*************************************
var getRetentionDeviceAnalysisCallback = {
	Convert : function(){
		getRetentionUserAnalysisCallback.Convert();
	},
	Assay : function(back, textStatus){
		getRetentionUserAnalysisCallback.Assay(back, textStatus, $("#retentionDeviceAnalysisList"));
	},
	Combine : function(back){
		getRetentionUserAnalysisCallback.Combine(back);
	}
}

//*************************************
//* 数据分析中心 -> 转化分析callback
//*************************************
var getConversionAnalysisCallback = {
	Convert : function(){
		var chartData = new Array(),
			dataChartLength = $("#dataChartSift a").length,
			onId = $("#dataChartSift a.on").attr("t_id").toLowerCase();
		
		curveChart.chartData.length = 0;
		function convertData(tArray){
			if (tArray) {
				var dataArray = new Array();
				for (var j = 0; j < tArray.length; j++) {
					if (onId == "create") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).create));
					}else if (onId == "convert") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).convert));
					}else if (onId == "load_done") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).load_done));
					}else if (onId == "init_done") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).init_done));
					}else if (onId == "activate") {
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).activate));
					}
				}
				curveChart.chartData.push(dataArray);
			}
		}
		convertData(look._USER_TEMP_ARRAY);
		if ($("#contrastCheckbox").is(":checked")) {
			convertData(look._USER_CONTRAST_ARRAY);
		}
		curveChart.draw();
	},
	Assay : function(back, textStatus){
		var listElement = $("#conversionAnalysisList");
		if(back.code == 0){
			listElement.empty();
			if(back.list.length != 0){
				var listHtml = "", arr;
				$.each(back.list, function(i, list){
					listElement.append(
						'<tr>' +
						'	<td>' + list.dt + '</td>' +
						'	<td>' + list.activate + '</td>' +
						'	<td>' + list.loadDone + '</td>' +
						'	<td>' + list.create + '</td>' +
						'	<td>' + list.initDone + '</td>' +
						'	<td>' + list.convert + '</td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				getConversionAnalysisCallback.Combine(back);
			}else{
				listElement.append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine : function(back){
		if (back.code == 0) {
			if (back.list.length != 0) {
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.list, function(i, list){
						look._USER_CONTRAST_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"activate":' + parseFloat(list.activate) +
							',"load_done":' + parseFloat(list.loadDone) +
							',"create":' + parseFloat(list.create) +
							',"init_done":' + parseFloat(list.initDone) +
							',"convert":' + parseFloat(list.convert) + '}'
						);
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.list, function(i, list){
						look._USER_TEMP_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.dt.replace(/\-/g,"/"))).getTime() + 28800000) +
							',"activate":' + parseFloat(list.activate) +
							',"load_done":' + parseFloat(list.loadDone) +
							',"create":' + parseFloat(list.create) +
							',"init_done":' + parseFloat(list.initDone) +
							',"convert":' + parseFloat(list.convert) + '}'
						);
					});
				}
				getConversionAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 收入情况分析callback
//*************************************
var getPayAnalysisCallback = {
	Convert : function(){
		var chartData = new Array(),
			dataChartLength = $("#dataChartSift a").length,
			onId = $("#dataChartSift a.on").attr("t_id").toLowerCase();
		
		curveChart.chartData.length = 0;
		function convertData(tArray){
			if (tArray) {
				var dataArray = new Array();
				for (var j = 0; j < tArray.length; j++) {
					if(onId == "amount"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).amount));
					}else if(onId == "pay_people"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).payPeople));
					}else if(onId == "pay_count"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).payCount));
					}else if(onId == "new_pay_user"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).newPayUser));
					}else if(onId == "dau"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).dau));
					}else if(onId == "arpu"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).arpu));
					}else if(onId == "arppu"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).arppu));
					}
				}
				curveChart.chartData.push(dataArray);
			}
		}
		convertData(look._USER_TEMP_ARRAY);
		if($("#contrastCheckbox").is(":checked")){
			convertData(look._USER_CONTRAST_ARRAY);
		}
		curveChart.draw();
	},
	Assay : function(back){
		var incomeAnalysisList = $("#incomeAnalysisList");
		incomeAnalysisList.empty();
		if(back.code == 0){
			if(back.data.count != 0){
				var detailHtml = "";
				if(back.data.total){
					back.data.total.productCountList ? detailHtml = '<a href="javascript:" class="a_as_button detail_income_subset" data="' + encodeURI(JSON.stringify(back.data.total.productCountList)) + '">' + look._I18N_DATA.$1129/**详细**/ + '</a>' : detailHtml = '<a href="javascript:" class="a_as_button a_as_disabled">' + look._I18N_DATA.$1129/**详细**/ + '</a>';
					incomeAnalysisList.append(
						'<tr class="total">' +
						'	<td><b>total</b></td>' +
						'	<td><b>' + back.data.total.amount + '</b></td>' +
						'	<td>' + back.data.total.payPeople + '</td>' +
						'	<td>' + back.data.total.payCount + '</td>' +
						'	<td>' + back.data.total.payRate + '</td>' +
						'	<td>' + back.data.total.newPayUser + '</td>' +
						'	<td>' + back.data.total.dau + '</td>' +
						'	<td>' + back.data.total.arpu + '</td>' +
						'	<td>' + back.data.total.arppu + '</td>' +
						'	<td><b>' + back.data.total.statAmount + '</b></td>' +
						'	<td>' + (publicInit.authenCheck(look._AUTHEN.da, 19) ? detailHtml : 'N/A') + '</td>' +
						'</tr>'
					);
				}
				$.each(back.data.items, function(i, list){
					list.productCountList ? detailHtml = '<a href="javascript:" class="a_as_button detail_income_subset" data="' + encodeURI(JSON.stringify(list.productCountList)) + '">' + look._I18N_DATA.$1129/**详细**/ + '</a>' : detailHtml = '<a href="javascript:" class="a_as_button a_as_disabled">' + look._I18N_DATA.$1129/**详细**/ + '</a>';
					incomeAnalysisList.append(
						'<tr>' +
						'	<td>' + list.payDay + '</td>' +
						'	<td><b>' + list.amount + '</b></td>' +
						'	<td>' + list.payPeople + '</td>' +
						'	<td>' + list.payCount + '</td>' +
						'	<td>' + list.payRate + '</td>' +
						'	<td>' + list.newPayUser + '</td>' +
						'	<td>' + list.dau + '</td>' +
						'	<td>' + list.arpu + '</td>' +
						'	<td>' + list.arppu + '</td>' +
						'	<td><b>' + list.statAmount + '</b></td>' +
						'	<td>' + (publicInit.authenCheck(look._AUTHEN.da, 19) ? detailHtml : 'N/A') + '</td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				getPayAnalysisCallback.Combine(back);
				//[事件]查看详细
				$(".detail_income_subset").unbind("click").bind("click", function(){
					var productCountList = $.parseJSON(decodeURI($(this).attr("data")));
					$.lookPop({
						url: "data/income_detail_poper.html",
						title: look._I18N_DATA.$1131/**充值详情**/,
						callback: function(){
							$.each(productCountList, function(i, list){
								$("#incomeDetailPoperList").append(
									'<tr>' +
									'	<td>' + list.payDay + '</td>' +
									'	<td>' + list.productId + '</td>' +
									'	<td c_id="' + list.channel + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
									'	<td><b>' + list.price + '</b></td>' +
									'	<td>' + (list.payGroup ? list.payGroup : "N/A") + '</td>' +
									'	<td><b>' + list.count + '</b</td>' +
									'</tr>'
								);
							});
							look._STAT_INCOME_DIC_ARRAY.length == 0 ? getIncomeDicRequest() : getIncomeDicCallback.AssayChannel();
							publicInit.tabelStyle(false);
						}
					});
				});
			}else{
				incomeAnalysisList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine : function(back){
		if (back.code == 0) {
			if (back.data.count != 0) {
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.data.items, function(i, list){
						look._USER_CONTRAST_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.payDay.replace(/\-/g,"/"))).getTime() + 28800000) + 
							',"amount":' + parseFloat(list.amount) + 
							',"payPeople":' + parseFloat(list.payPeople) + 
							',"payCount":' + parseFloat(list.payCount) + 
							',"newPayUser":' + parseFloat(list.newPayUser) + 
							',"dau":' + parseFloat(list.dau) + 
							',"arpu":' + parseFloat(list.arpu) + 
							',"arppu":' + parseFloat(list.arppu) + '}'
						);
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.data.items, function(i, list){
						look._USER_TEMP_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.payDay.replace(/\-/g,"/"))).getTime() + 28800000) + 
							',"amount":' + parseFloat(list.amount) + 
							',"payPeople":' + parseFloat(list.payPeople) + 
							',"payCount":' + parseFloat(list.payCount) + 
							',"newPayUser":' + parseFloat(list.newPayUser) + 
							',"dau":' + parseFloat(list.dau) + 
							',"arpu":' + parseFloat(list.arpu) + 
							',"arppu":' + parseFloat(list.arppu) + '}'
						);
					});
				}
				getPayAnalysisCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 新用户收入分析callback
//*************************************
var getNewUserPayAnalysisCallback = {
	Assay: function(back){
		var newUserIncomeAnalysisList = $("#newUserIncomeAnalysisList").children("tbody"),
			dayFlag = (Date.parse(look.getHashParam("user_from")) - Date.parse(look._DATA_POST_DAY));
		var tAmount = 0, tNewUserNum = 0, tNewUserAverage = 0, tPayPeople = 0, tPayCount = 0, tPayRate = 0, tArppu = 0, tStatAmount = 0;
		$("#newUserIncomeAnalysisList tfoot").show();
		if (dayFlag == 0) {
			newUserIncomeAnalysisList.html('<tr class="total"><td colspan="11">loading..</td></tr>');
		}
		if(back.code == 0){
			if(back.data){
				var detailHtml = "";
				var customMonth = look.getHashParam("custom_month"), postFrom = look.getHashParam("from"), postTo = look.getHashParam("to");
				if(customMonth != "" && customMonth != 0){
					postFrom = look.dateFormat(look.addDaysByDate(look._DATA_POST_DAY, 30 * (customMonth - 1)), "yyyy-MM-dd");
					postTo = look.dateFormat(look.addDaysByDate(look._DATA_POST_DAY, 30 * customMonth), "yyyy-MM-dd");
				}
				detailHtml = back.data.productCountList != "" ? '<a href="javascript:" class="a_as_button detail_income_subset" data="' + encodeURI(JSON.stringify(back.data.productCountList)) + '">' + look._I18N_DATA.$1129/**详细**/ + '</a>' : '<a href="javascript:" class="a_as_button a_as_disabled">' + look._I18N_DATA.$1129/**详细**/ + '</a>';
				look._DATA_BACK_DATA.push(back.data);
				newUserIncomeAnalysisList.append(
					'<tr>' +
					'	<td>' + look._DATA_POST_DAY + '</td>' +
					'	<td>' + postFrom + '~' + postTo + '</td>' +
					'	<td><b>' + back.data.amount + '</b></td>' +
					'	<td>' + back.data.newUserNum + '</td>' +
					'	<td>' + back.data.newUserAverage + '</td>' +
					'	<td>' + back.data.payPeople + '</td>' +
					'	<td>' + back.data.payCount + '</td>' +
					'	<td>' + back.data.payRate + '</td>' +
					'	<td>' + back.data.arppu + '</td>' +
					'	<td><b>' + back.data.statAmount + '</b></td>' +
					'	<td>' + (publicInit.authenCheck(look._AUTHEN.da, 33) ? detailHtml : 'N/A') + '</td>' +
					'</tr>'
				);
				
				$.each(look._DATA_BACK_DATA, function(i, list){
					newUserIncomeAnalysisList.children("tr.total").html(
						'<td><b>total</b></td>' +
						'<td>N/A</td>' +
						'<td><b>' + (tAmount += Number(list.amount)).toFixed(4)  + '</b></td>' +
						'<td>' + (tNewUserNum += Number(list.newUserNum)) + '</td>' +
						'<td>' + (tAmount / tNewUserNum).toFixed(4) + '</td>' +
						'<td>' + (tPayPeople += Number(list.payPeople)) + '</td>' +
						'<td>' + (tPayCount += Number(list.payCount)) + '</td>' +
						'<td>' + (tPayPeople / tNewUserNum).toFixed(4) + '</td>' +
						'<td>' + (tAmount / tPayPeople).toFixed(4) + '</td>' +
						'<td><b>' + (tStatAmount += Number(list.statAmount)).toFixed(4) + '</b></td>' +
						'<td>N/A</td>'
					);
				});
				
				if((Date.parse(look.getHashParam("user_to")) - Date.parse(look._DATA_POST_DAY)) != 0){
					look._DATA_POST_DAY = look.dateFormat(look.addDaysByDate(look._DATA_POST_DAY, 1), "yyyy-MM-dd");
					getNewUserPayAnalysisRequest(look.getHashParam("appid"), look.getHashParam("server_id"), postFrom, postTo, look._DATA_POST_DAY, look.getHashParam("channel"), look.getHashParam("device_type"), look.getHashParam("locale"));
				}else{
					newUserIncomeAnalysisList.next().hide();
					publicInit.tabelStyle();
				}
				//[事件]查看详细
				$(".detail_income_subset").unbind("click").bind("click", function(){
					var productCountList = $.parseJSON(decodeURI($(this).attr("data"))),
						userDay = $(this).parents("tr").attr("u_day");
					$.lookPop({
						url: "data/income_detail_poper.html",
						title:  look._I18N_DATA.$1131/**充值详情**/,
						callback: function(){
							$.each(productCountList, function(i){
								$("#incomeDetailPoperList").append(
									'<tr>' +
									'	<td>-</td>' +
									'	<td>' + productCountList[i].productId + '</td>' +
									'	<td c_id="' + productCountList[i].channel + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
									'	<td><b>' + productCountList[i].price + '</b></td>' +
									'	<td>' + (productCountList[i].payGroup ? productCountList[i].payGroup : "N/A") + '</td>' +
									'	<td><b>' + productCountList[i].count + '</b</td>' +
									'</tr>'
								);
							});
							look._STAT_INCOME_DIC_ARRAY.length == 0 ? getIncomeDicRequest() : getIncomeDicCallback.AssayChannel();
							publicInit.tabelStyle(false);
						}
					});
				});
			}else{
				newUserIncomeAnalysisList.append('<tr><td colspan="11">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 新用户收入月报callback
//*************************************
var getNewUserPayStatementCallback = {
	Convert : function(){
		var chartData = new Array(),
			dataChartLength = $("#dataChartSift a").length,
			onId = $("#dataChartSift a.on").attr("t_id").toLowerCase();
		
		curveChart.chartData.length = 0;
		function convertData(tArray){
			if (tArray) {
				var dataArray = new Array();
				for (var j = 0; j < tArray.length; j++) {
					if(onId == "new_user_num"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).newUserNum));
					}else if(onId == "average"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).newUserAverage));
					}else if(onId == "amount"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).amount));
					}else if(onId == "pay_people"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).payPeople));
					}else if(onId == "pay_count"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).payCount));
					}else if(onId == "arpu"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).arpu));
					}else if(onId == "arppu"){
						dataArray.push(new Array($.parseJSON(tArray[j]).date, $.parseJSON(tArray[j]).arppu));
					}
				}
				curveChart.chartData.push(dataArray);
			}
		}
		convertData(look._USER_TEMP_ARRAY);
		if($("#contrastCheckbox").is(":checked")){
			convertData(look._USER_CONTRAST_ARRAY);
		}
		curveChart.draw();
	},
	Assay: function(back){
		var newUserIncomeStatementList = $("#newUserIncomeStatementList");
		newUserIncomeStatementList.children("tr:first").nextAll().remove();
		if(back.code == 0){
			if(back.data.count != 0){
				var detailHtml = "";
				$.each(back.data.items, function(i, list){
					list.productCountList.length != 0 ? detailHtml = '<a href="javascript:" class="a_as_button detail_income_subset" data="' + encodeURI(JSON.stringify(list.productCountList)) + '">' + look._I18N_DATA.$1129/**详细**/ + '</a>' : detailHtml = '<a href="javascript:" class="a_as_button a_as_disabled">' + look._I18N_DATA.$1129/**详细**/ + '</a>';
					newUserIncomeStatementList.append(
						'<tr>' +
						'	<td>' + list.newUserDay + '</td>' +
						'	<td><b>' + list.newUserNum + '</b></td>' +
						'	<td>' + list.newUserAverage + '</td>' +
						'	<td><b>' + list.amount + '</b></td>' +
						'	<td>' + list.payPeople + '</td>' +
						'	<td>' + list.payCount + '</td>' +
						'	<td>' + list.payRate + '</td>' +
						'	<td>' + list.arpu + '</td>' +
						'	<td>' + list.arppu + '</td>' +
						'	<td><b>' + list.statAmount + '</b></td>' +
						'	<td>' + (publicInit.authenCheck(look._AUTHEN.da, 26) ? detailHtml : 'N/A') + '</td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				getNewUserPayStatementCallback.Combine(back);
				//[事件]查看详细
				$(".detail_income_subset").unbind("click").bind("click", function(){
					var productCountList = $.parseJSON(decodeURI($(this).attr("data")));
					$.lookPop({
						url: "data/income_detail_poper.html",
						title: look._I18N_DATA.$1130/**新用户充值详情**/,
						callback: function(){
							$.each(productCountList, function(i){
								$("#incomeDetailPoperList").append(
									'<tr>' +
									'	<td>' + productCountList[i].payDay + '</td>' +
									'	<td>' + productCountList[i].productId + '</td>' +
									'	<td c_id="' + productCountList[i].channel + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
									'	<td><b>' + productCountList[i].price + '</b></td>' +
									'	<td>' + (productCountList[i].payGroup ? productCountList[i].payGroup : "N/A") + '</td>' +
									'	<td><b>' + productCountList[i].count + '</b</td>' +
									'</tr>'
								);
							});
							look._STAT_INCOME_DIC_ARRAY == undefined ? Look.prototype._STAT_INCOME_DIC_ARRAY = new Array() : null;
							look._STAT_INCOME_DIC_ARRAY.length == 0 ? getIncomeDicRequest() : getIncomeDicCallback.AssayChannel();
							publicInit.tabelStyle(false);
						}
					});
				});
			}else{
				newUserIncomeStatementList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	},
	Combine : function(back){
		if (back.code == 0) {
			if (back.data.count != 0) {
				if ($("#contrastCheckbox").is(":checked")) {
					Look.prototype._USER_CONTRAST_ARRAY = new Array();
					$.each(back.data.items, function(i, list){
						look._USER_CONTRAST_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.newUserDay.replace(/\-/g,"/"))).getTime() + 28800000) + 
							',"newUserNum":' + parseFloat(list.newUserNum) + 
							',"newUserAverage":' + parseFloat(list.newUserAverage) + 
							',"amount":' + parseFloat(list.amount) + 
							',"payPeople":' + parseFloat(list.payPeople) + 
							',"payCount":' + parseFloat(list.payCount) + 
							',"arpu":' + parseFloat(list.arpu) + 
							',"arppu":' + parseFloat(list.arppu) + '}'
						);
					});
				}else{
					Look.prototype._USER_TEMP_ARRAY = new Array();
					$.each(back.data.items, function(i, list){
						look._USER_TEMP_ARRAY.push(
							'{"date":' + (new Date(Date.parse(list.newUserDay.replace(/\-/g,"/"))).getTime() + 28800000) + 
							',"newUserNum":' + parseFloat(list.newUserNum) + 
							',"newUserAverage":' + parseFloat(list.newUserAverage) + 
							',"amount":' + parseFloat(list.amount) + 
							',"payPeople":' + parseFloat(list.payPeople) + 
							',"payCount":' + parseFloat(list.payCount) + 
							',"arpu":' + parseFloat(list.arpu) + 
							',"arppu":' + parseFloat(list.arppu) + '}'
						);
					});
				}
				getNewUserPayStatementCallback.Convert();
			}else{
				look.showInfo.error(look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 数据分析中心 -> 用户付费统计callback
//*************************************
var getUserPayStatementCallback = {
	Assay: function(back){
		var userPayAnalysisList = $("#userPayAnalysisList");
		if(back.code == 0){
			back.data.page == 1 ? userPayAnalysisList.empty() : null;
			if(back.data.count != 0){
				var detailHtml = "";
				back.data.count < look._PAGER_SIZE * 5 ? $(".more_subset").parents("tfoot").hide() : $(".more_subset").parents("tfoot").show();
				$.each(back.data.items, function(i, list){
					userPayAnalysisList.append(
						'<tr>' +
						'	<td>' + (i + 1 + (back.data.page - 1) * look._PAGER_SIZE * 5) + '</td>' +
						'	<td>' + list.uid + '</td>' +
						'	<td>' + (list.userName ? list.userName : "N/A") + '</td>' +
						'	<td>' + (list.nickName ? list.nickName : "N/A") + '</td>' +
						'	<td><b>' + list.bucks + '</b></td>' +
						'	<td><b>' + list.amount + '</b></td>' +
						'	<td>' + (list.updateTime ? list.updateTime : "N/A") + '</td>' +
						'</tr>'
					);
				});
				publicInit.tabelStyle();
				//[事件]更多
				$(".more_subset").unbind("click").bind("click", function(){
					if($(this).hasClass("a_as_disabled")){return false;}
					getUserPayStatementRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("date_from"), look.getHashParam("date_to"), back.data.page + 1);
					$(this).addClass("a_as_disabled");
				}).removeClass("a_as_disabled");
			}else{
				userPayAnalysisList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
				$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			$("#chartCell").html('<p class="no_chart"><img src="../images/warning_icon.png"><br/>' + look._I18N_DATA.$315/**没有查到任何数据…**/ + '</p>');
		}
	}
}

//*************************************
//* 数据分析中心 -> 报表系统callback
//*************************************
var getStatementSystemDataCallback = {
	Assay : function(back){
		var statementSystemDataList = $("#statementSystemDataList");
		if(back.code == 0){
			statementSystemDataList.empty();
			if(back.list.length != 0){
				var listHtml = '<tr><th>' +  look._I18N_DATA.$1127/**日期**/ + ' \\ ' +  look._I18N_DATA.$1128/**值名**/ + '</th><th>Total</th>', arr;
				
				$.each(back.key, function(i){
					listHtml += '<th>' + back.key[i] + '</th>';
				});
				
				listHtml += '</tr>';
				
				var total = 0, totalArray = new Array();
				$.each(back.list, function(i, list){
					if(i % back.key.length == 0){
						listHtml += '<tr>';
						listHtml += '<td>' + list.dt + '</td>';
						listHtml += '<td><b class="color_yellow">-</b></td>';
					}
					total += parseInt(!isNaN(list.value) ? list.value : 0);
					listHtml += '<td><b>' + list.value + '</b></td>';
					if (i % back.key.length == back.key.length - 1) {
						listHtml += "</tr>";
						totalArray.push(total);
						total = 0;
					}
				});
				statementSystemDataList.append(listHtml).find("tr b.color_yellow").each(function(i){
					$(this).text(totalArray[i]);
				});
				publicInit.tabelStyle();
			}else{
				statementSystemDataList.append('<tr><td>' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
			statementSystemDataList.append('<tr><td>' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}
}
var getStatementSystemDataComplete = function(){
	$("#resultLoader").hide();
	$("#siftSubset").removeClass("a_as_disabled");
}

/*** data Callback END ***/

/*** flight_mis Callback START ***/

//*************************************
//* 游戏帐号管理系统 -> 航空 -> 字典
//* 获取“飞机字典”callback
//*************************************
var flightGetAircraftDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				$.each(back.data, function(i, list){
					look._FLIGHT_AIRCRAFT_DIC_ARRAY.push(new Array(list.id, list.nameCn, list.uniqueId));
				});
				flightGetAircraftDictionaryCallback.Assay();
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$491/**：飞机字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay : function(){
		$.map(look._FLIGHT_AIRCRAFT_DIC_ARRAY, function(n){
			$("#flightAircraftSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
		});
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空 -> 字典
//* 获取“道具字典”callback
//*************************************
var flightGetItemDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				$.each(back.data, function(i, list){
					look._FLIGHT_ITEM_DIC_ARRAY.push(new Array(list.id, list.nameCn, list.uniqueId));
				});
				flightGetItemDictionaryCallback.Assay();
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$492/**：道具字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay: function(){
		$.map(look._FLIGHT_ITEM_DIC_ARRAY, function(n){
			$("#flightItemSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
		});
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空 -> 字典
//* 获取“消费类型字典”callback
//*************************************
var flightGetConsumeDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				look._FLIGHT_CONSUME_DIC_ARRAY.length = 0;
				$.each(back.data, function(i, list){
					look._FLIGHT_CONSUME_DIC_ARRAY.push(new Array(list.type, list.typeName));
				});
				getConsumeRecordAssay(look._FLIGHT_CONSUME_DIC_ARRAY);
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$450/**：消费类型字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空 -> 字典
//* 获取“支付类型字典”callback
//*************************************
var flightGetBuckDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				look._FLIGHT_BUCK_DIC_ARRAY.length = 0;
				$.each(back.data, function(i, list){
					look._FLIGHT_BUCK_DIC_ARRAY.push(new Array(list.type, list.typeName));
				});
				getBuckRecordAssay(look._FLIGHT_BUCK_DIC_ARRAY);
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$451/**：支付类型字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空 -> 字典
//* 获取“自定义道具字典”callback
//*************************************
var flightGetCustomItemDictionaryCallback = {
	Convert_6: function(back){
		if (back.code == 0) {
			if (back.data != "") {
				$.each(back.data, function(i, list){
					look._FLIGHT_CUSTOM_ITEM_6_DIC_ARRAY.push(new Array(list.id, list.nameCn, list.uniqueId));
				});
				flightGetCustomItemDictionaryCallback.Assay(look._FLIGHT_CUSTOM_ITEM_6_DIC_ARRAY);
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$535/**：自定义道具的外星科技字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Convert_7: function(back){
		if (back.code == 0) {
			if (back.data != "") {
				$.each(back.data, function(i, list){
					look._FLIGHT_CUSTOM_ITEM_7_DIC_ARRAY.push(new Array(list.id, list.nameCn, list.uniqueId));
				});
				flightGetCustomItemDictionaryCallback.Assay(look._FLIGHT_CUSTOM_ITEM_7_DIC_ARRAY);
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$536/**：自定义道具的战机合成材料字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay: function(dic){
		$("#flightItemSelect").empty().fadeIn();
		$.map(dic, function(n){
			$("#flightItemSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
		});
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空 -> 字典
//* 获取“战斗机字典”callback
//*************************************
var flightGetFighterDictionaryCallback = {
	Convert: function(back){
		if (back.code == 0) {
			if (back.data != "") {
				$.each(back.data, function(i, list){
					look._FLIGHT_FIGHTER_DIC_ARRAY.push(new Array(list.id, list.nameCn, list.uniqueId));
				});
				flightGetFighterDictionaryCallback.Assay();
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$533/**：战斗机字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay: function(){
		$.map(look._FLIGHT_FIGHTER_DIC_ARRAY, function(n){
			$("#flightUserFighterSelect").append('<option value="' + n[0] + '">' + n[1] + '</option>');
		});
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“玩家基本信息”callback
//*************************************
var flightGetUserInfoCallback = function(back){
	var flightUserInfoList = $("#flightUserInfoList");
	flightUserInfoList.html("");
	if(back.code == 0){
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				var disabled = list.disabled, statusHtml = "";
				if(disabled == 0){
					statusHtml = '　<a href="javascript:" class="a_as_button a_as_red change_status_subset">' + look._I18N_DATA.$631/**封禁**/ + '</a>';
				}else if(disabled == 1){
					statusHtml = '　<a href="javascript:" class="a_as_button a_as_green change_status_subset">' + look._I18N_DATA.$630/**解禁**/ + '</a>';
				}
				flightUserInfoList.append(
					'<tr dis="' + disabled + '">' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.uid + '</td>' +
					'	<td>' + list.name + '</td>' +
					'	<td>' + list.type + '</td>' +
					'	<td>' + list.money + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.exp + '</td>' +
					'	<td>' + list.fuel + '</td>' +
					'	<td>' + 
					(publicInit.authenCheck(look._AUTHEN.misFlight, 7) ? ('<a href="javascript:" class="a_as_button modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' + statusHtml) : 'N/A') + 
					(publicInit.authenCheck(look._AUTHEN.misFlight, 23)
					 || publicInit.authenCheck(look._AUTHEN.misFlight, 27)
					 || publicInit.authenCheck(look._AUTHEN.misFlight, 28)
					  ? '　<a href="javascript:" class="a_as_button a_as_gray operate_subset" gid="' + list.id + '">' + look._I18N_DATA.$36/**操作**/ + '</a>' : '') + 
					'	</td>' +
					'</tr>' +
					'<tr class="hidden" g_id="' + list.id + '" u_id="' + list.uid + '">' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.uid + '</td>' +
					'	<td>' + list.name + '</td>' +
					'	<td>' + list.type + '</td>' +
					'	<td><input type="text" class="text" value="' + list.money + '" /></td>' +
					'	<td>' + list.level + '</td>' +
					'	<td><input type="text" class="text" value="' + list.exp + '" /></td>' +
					'	<td><input type="text" class="text" value="' + list.fuel + '" /></td>' +
					'	<td><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]修改信息
			$(".modify_subset").bind("click", function(){
				$(this).parents("tr").toggle().next().toggle().find("input.text:first").focus();
			});
			$(".cancel_subset").bind("click", function(){
				$(this).parents("tr").toggle().prev().toggle();
			});
			//[事件]确定修改
			$(".confirm_modify_subset").bind("click", function(){
				var preElement = $(this).parents("tr").prev(),
					preMoney = preElement.children("td").eq(4).text(),
					preExp = preElement.children("td").eq(6).text(),
					preFuel = preElement.children("td").eq(7).text(),
					disabled = preElement.attr("dis");
					element = $(this).parents("tr"),
					userId = element.attr("u_id"),
					money = $.trim(element.children("td").eq(4).children("input.text").val()),
					exp = $.trim(element.children("td").eq(6).children("input.text").val()),
					fuel = $.trim(element.children("td").eq(7).children("input.text").val());
				if(preMoney == money && preExp == exp && preFuel == fuel){look.showInfo.error(look._I18N_DATA.$483/**未做任何修改…**/);element.find("input.text").first().focus();return false;}
				if(isNaN(money) || isNaN(exp) || isNaN(fuel)){look.showInfo.error(look._I18N_DATA.$493/**修改的数据必须全是数字…**/);return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$827/**确定修改数据？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						flightModifyUserInfoRequest(userId, money, exp, fuel, disabled);
					}
				});
			});
			//[事件]封禁&解禁
			$(".change_status_subset").unbind("click").bind("click", function(){
				var element = $(this).parents("tr"),
					userId = element.next().attr("u_id"),
					money = element.children("td").eq(4).text(),
					exp = element.children("td").eq(6).text(),
					fuel = element.children("td").eq(7).text(),
					disabled = element.attr("dis");
				var banHtml = "";
				if(disabled == 0){
					disabled = 1;banHtml = look._I18N_DATA.$631/**封禁**/;
				}else if(disabled == 1){
					disabled = 0;banHtml = look._I18N_DATA.$630/**解禁**/;
				}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$828/**确定要{operate}该玩家？**/.replace(/{operate}/ig, banHtml) + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						flightModifyUserInfoRequest(userId, money, exp, fuel, disabled);
					}
				});
			});
			var operateEventBind = function(gid){
				//[事件]修复
				$(".fix_subset").unbind("click").bind("click", function(){
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$803/**确定要修复该玩家数据？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							flightFixUserInfoRequest(gid);
						}
					});
				});
				//[事件]vip信息
				$(".get_vip_subset").unbind("click").bind("click", function(){
					$.lookPop({
						type: -1,
						title: look._I18N_DATA.$1260/**vip信息**/,
						html: '<div class="operation_wrapper" id="flightUserVipInfoList"><p class="load_result"><img src="../images/small_loader.gif" class="loader_icon" /></p></div>'
					});
					flightGetUserVipInfoRequest(gid);
				});
				//[事件]持有建筑
				$(".get_building_subset").unbind("click").bind("click", function(){
					$.clearPopDiv({id: ".operate_menu_panel"});
					look._FLIGHT_USER_INFO.Set_GID(gid);
				});
			}
			//[事件]弹出操作菜单
			$(".operate_subset").unbind("click").bind("click", function(){
				var obj = $(this), gid = obj.attr("gid");
				publicInit.menuPoper(
					[
						(publicInit.authenCheck(look._AUTHEN.misFlight, 23) ? '<p><a href="javascript:" class="fix_subset">' + look._I18N_DATA.$673/**修复**/ + '</a></p>' : ''),
						(publicInit.authenCheck(look._AUTHEN.misFlight, 27) ? '<p><a href="javascript:" class="get_vip_subset">' + look._I18N_DATA.$1260/**vip信息**/ + '</a></p>' : ''),
						(publicInit.authenCheck(look._AUTHEN.misFlight, 28) ? '<p><a href="' + look.setParam([["type", "user_building"]], location.hash) + '" class="get_building_subset">' + look._I18N_DATA.$188/**玩家持有建筑**/ + '</a></p>' : ''),
					],
					obj.offset().left + obj.outerWidth(),
					obj.offset().top + 20,
					function(){
						operateEventBind(gid);
					}
				);
			});
		}else{
			flightUserInfoList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		flightUserInfoList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 修改“玩家基本信息”callback
//*************************************
var flightModifyUserInfoCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“玩家vip信息”callback
//*************************************
var flightGetUserVipInfoCallback = function(back){
	var flightUserVipInfoList = $("#flightUserVipInfoList");
	if(back.code == 0){
		if (back.data){
			flightUserVipInfoList.html(
				'<div class="result_info">' +
				'	<p><span class="left">' + look._I18N_DATA.$2120/**vip级别：**/ + '</span><span>' + back.data.viplv + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2121/**民航礼包：**/ + '</span><span>' + back.data.awardviplv + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2122/**战斗礼包：**/ + '</span><span>' + back.data.awardfightlv + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2123/**充值经验：**/ + '</span><span>' + back.data.vipexp + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2124/**赠送经验：**/ + '</span><span>' + back.data.giftexp + '</span></p>' +
				'</div>'
			)
		}else{
			flightUserVipInfoList.html('<p class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</p>');
		}
	}else{
		flightUserVipInfoList.html('<p class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“玩家日常活动信息”callback
//*************************************
var flightGetUserActivityCallback = function(back){
	var flightUserActivityList = $("#flightUserActivityList");
	flightUserActivityList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				flightUserActivityList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.eventId + '</td>' +
					'	<td>' + list.titleCn + '</td>' +
					'	<td>' + list.currentRewardDate + '</td>' +
					'	<td>' + list.currentRewardValue + '</td>' +
					'	<td>' + list.currentRewardStatus + '</td>' +
					'	<td>' + list.dailyRewardCount + '</td>' +
					'	<td>' + list.lastDailyRewardDate + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			flightUserActivityList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		flightUserActivityList.append('<tr><td colspan="8">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“玩家持有飞机信息”callback
//*************************************
var flightGetUserAircraftCallback = function(back){
	var flightUserAircraftList = $("#flightUserAircraftList");
	flightUserAircraftList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				flightUserAircraftList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.uniqueId + '</td>' +
					'	<td>' + list.nameCn + '</td>' +
					'	<td>' + (list.paintName ? list.paintName : "/") + '</td>' +
					'	<td>' + list.status + '</td>' +
					'	<td>' + list.createdAt + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			flightUserAircraftList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		flightUserAircraftList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 添加飞机callback
//*************************************
var flightAddAircraftCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		$("#addCountInput, #flightAircraftSelect").val("");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“玩家持有建筑信息”callback
//*************************************
var flightGetUserBuildingCallback = function(back){
	var flightUserBuildingList = $("#flightUserBuildingList");
	flightUserBuildingList.html("");
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				flightUserBuildingList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.name + '</td>' +
					'	<td>' + list.plot + '</td>' +
					'	<td>' + list.startTime + '</td>' +
					'	<td>' + list.nextProfitTime + '</td>' +
					'	<td>' + list.completeTime + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			flightUserBuildingList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		flightUserBuildingList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“玩家道具信息”callback
//*************************************
var flightGetUserItemCallback = function(back){
	var flightUserItemList = $("#flightUserItemList");
	flightUserItemList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				flightUserItemList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.uniqueId + '</td>' +
					'	<td>' + list.nameCn + '</td>' +
					'	<td>' + list.itemNum + '</td>' +
					'	<td>' + list.newStatus + '</td>' +
					'	<td>' + list.createdAt + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			flightUserItemList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		flightUserItemList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 添加道具callback
//*************************************
var flightAddItemCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		$("#addCountInput, #flightItemSelect").val("");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“玩家自定义道具信息”callback
//*************************************
var flightGetUserCustomItemCallback = function(back){
	var flightUserCustomItemList = $("#flightUserCustomItemList");
	flightUserCustomItemList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			var itemTypeHtml = "";
			$.each(back.data, function(i, list){
				switch(list.type){
					case 12 : itemTypeHtml = look._I18N_DATA.$1091/**战斗机材料**/;break;
					case 13 : itemTypeHtml = look._I18N_DATA.$1092/**外星科技道具**/;break;
				}
				flightUserCustomItemList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.uniqueId + '</td>' +
					'	<td t_key="' + list.typeKey + '">' + list.nameCn + '</td>' +
					'	<td i_type="' + list.type + '">' + itemTypeHtml + '</td>' +
					'	<td>' + list.num + '</td>' +
					'	<td>' + (list.createdAt ? list.createdAt : 'N/A') + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			flightUserCustomItemList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		flightUserCustomItemList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 添加自定义道具callback
//*************************************
var flightAddCustomItemCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		$("#addCountInput").val("");
		location.hash = look.setParam([["user_id", look._FLIGHT_USER_INFO.Get_GID()], ["game_id", look._FLIGHT_USER_INFO.Get_UID()], ["item_type", $("#flightUserCustomItemTypeSelect").val()]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“玩家战斗机信息”callback
//*************************************
var flightGetUserFighterCallback = function(back){
	var flightUserFighterList = $("#flightUserFighterList");
	flightUserFighterList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			var statusHtml = "";
			$.each(back.data, function(i, list){
				switch(list.status){
					case 0 : statusHtml = look._I18N_DATA.$993/**背包**/;break;
					case 1 : statusHtml = look._I18N_DATA.$1136/**出战**/;break;
				}
				flightUserFighterList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.uniqueId + '</td>' +
					'	<td t_key="' + list.typeKey + '">' + list.nameCn + '</td>' +
					'	<td>' + list.armorLv + '</td>' +
					'	<td>' + list.dmg1Lv + '</td>' +
					'	<td>' + list.dmg2Lv + '</td>' +
					'	<td>' + list.hpLv + '</td>' +
					'	<td>' + list.mobileLv + '</td>' +
					'	<td>' + list.hiddenIdx + '</td>' +
					'	<td s_id="' + list.status + '">' + statusHtml + '</td>' +
					'	<td>' + list.createdAt + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			flightUserFighterList.append('<tr><td colspan="12">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		flightUserFighterList.append('<tr><td colspan="12">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 添加战斗机callback
//*************************************
var flightAddFighterCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		$("#addCountInput, #flightUserFighterSelect").val("");
		location.hash = look.setParam([["user_id", look._FLIGHT_USER_INFO.Get_GID()], ["game_id", look._FLIGHT_USER_INFO.Get_UID()]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“战斗信息”callback
//*************************************
var flightGetUserCombatCallback = function(back){
	var flightUserCombatList = $("#flightUserCombatList");
	flightUserCombatList.html("");
	if(back.code == 0){
		if (back.data != "") {
			list = back.data;
			flightUserCombatList.append(
				'<tr gid="' + list.playerKey + '">' +
				'	<td>' + list.playerKey + '</td>' +
				'	<td>' + list.name + '</td>' +
				'	<td>' + list.level + '</td>' +
				'	<td>' + list.exp + '</td>' +
				'	<td>' + list.glory + '</td>' +
				'	<td>' + list.metal + '</td>' +
				'	<td>' + list.chips + '</td>' +
				'	<td>' + list.bagIdx + '</td>' +
				'	<td>' + list.apronIdx + '</td>' +
				'	<td>' +
				(publicInit.authenCheck(look._AUTHEN.misFlight, 26) ? ('<a href="javascript:" class="a_as_button modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray operate_subset">' + look._I18N_DATA.$36/**操作**/ + '</a>') : 'N/A') +
				'	</td>' +
				'</tr>' +
				'<tr class="hidden" gid="' + list.playerKey + '">' +
				'	<td>' + list.playerKey + '</td>' +
				'	<td>' + list.name + '</td>' +
				'	<td>' + list.level + '</td>' +
				'	<td><input type="text" class="text" name="exp" value="' + list.exp + '" /></td>' +
				'	<td><input type="text" class="text" name="glory" value="' + list.glory + '" /></td>' +
				'	<td><input type="text" class="text" name="metal" value="' + list.metal + '" /></td>' +
				'	<td><input type="text" class="text" name="chips" value="' + list.chips + '" /></td>' +
				'	<td>' + list.bagIdx + '</td>' +
				'	<td>' + list.apronIdx + '</td>' +
				'	<td><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
				'</tr>'
			);
			publicInit.tabelStyle();
			//[事件]修改信息
			$(".modify_subset").bind("click", function(){
				$(this).parents("tr").toggle().next().toggle().find("input.text:first").focus();
			});
			$(".cancel_subset").bind("click", function(){
				$(this).parents("tr").toggle().prev().toggle();
			});
			//[事件]确定修改
			$(".confirm_modify_subset").bind("click", function(){
				var gid = $(this).parents("tr").attr("gid"), param = $(this).parents("form").serialize();
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$827/**确定修改数据？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						flightModifyUserCombatRequest(gid, 1, param);
					}
				});
			});
			//[事件]弹出操作菜单
			$(".operate_subset").unbind("click").bind("click", function(){
				if (!publicInit.authenCheck(look._AUTHEN.misFlight, 26)) {return false;}
				var obj = $(this), gid = obj.parents("tr").attr("gid");
				publicInit.menuPoper(
					[
						'<p><a href="javascript:" id="poperAddCopySubset" type="2">' + look._I18N_DATA.$5125/**增加玩家副本次数20点**/ + '</a></p>',
						'<p><a href="javascript:" id="poperRecoverChallengeSubset" type="3">' + look._I18N_DATA.$5126/**恢复玩家日排位战挑战次数15点**/ + '</a></p>'
					],
					obj.offset().left + obj.outerWidth(),
					obj.offset().top + 20,
					function(){
						//[事件]增加玩家副本次数/恢复玩家日排位战挑战次数
						$("#poperAddCopySubset, #poperRecoverChallengeSubset").unbind("click").bind("click", function(){
							var type = $(this).attr("type"), word = $(this).html();
							$.lookPop({
								type: 2,
								title: look._I18N_DATA.$66/**提醒**/,
								html:
									'<div style="width:500px;">' +
									'	<div class="pop_content_word">' +
									'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$821/**确定要{operate}？**/.replace(/{operate}/ig, '<b class="color_yellow">' + word + '</b>') + '</span>' +
									'	</div>' +
									'</div>',
								confirmCallback: function(obj){
									if(obj.hasClass("a_as_disabled")){return false;}
									obj.addClass("a_as_disabled");
									flightModifyUserCombatRequest(gid, type, "");
								}
							});
						});
					}
				);
			});
		}else{
			flightUserCombatList.append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		flightUserCombatList.append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 修改“玩家战斗信息”callback
//*************************************
var flightModifyUserCombatCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 获取“经验活动配置”信息callback
//*************************************
var flightGetActConfigCallback = function(back){
	var flightActConfigList = $("#flightActConfigList");
	flightActConfigList.empty();
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if(back.data.length != 0){
			$.each(back.data, function(i, list){
				var activityType = list.type, activityTypeHtml = "", acondition = list.lstcondition, aconditionHtml = "";
				switch(activityType){
					case 2 : activityTypeHtml = look._I18N_DATA.$1137/**航站楼**/; break;
					case 3 : activityTypeHtml = look._I18N_DATA.$1138/**飞机收入**/; break;
					case 4 : activityTypeHtml = look._I18N_DATA.$1139/**飞机属性**/; break;
					case 5 : activityTypeHtml = look._I18N_DATA.$1140/**停机坪属性**/; break;
					default : activityTypeHtml = look._I18N_DATA.$10/**未知**/;
				}
				for(var j = 0 ; j < acondition.length; j++){
					aconditionHtml += '<em>' + acondition[j] + '</em>';
				}
				flightActConfigList.prepend(
					'<div class="publisher_panel activity_config_panel" c_id="' + list.idx + '">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title"><tt>' + look._I18N_DATA.$2070/**活动类型：**/ + "</tt>"  + activityTypeHtml + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><span>' + list.begindate + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span><span>' + list.enddate + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2071/**活动倍率：**/ + '</span><span>' + list.uptimes + '</span></div>' +
					'		<div class="publisher_row auto_height"><span class="label">' + look._I18N_DATA.$2072/**活动条件：**/ + '</span><span class="item_cell">' + aconditionHtml + '</span><div class="clear"></div></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					'			<a href="javascript:" class="a_as_button a_as_red right look_hidden delete_subset">' + look._I18N_DATA.$638 /**删除**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
			});
			flightActConfigList.append('<div class="clear"></div>');
			//重新布局
			publicInit.resetPublisherPanel($(".activity_config_panel"), flightActConfigList);
			//[事件]删除按钮显示隐藏
			$(".activity_config_panel .bottom").bind("mouseenter mouseleave", function(){
				$(this).find(".delete_subset").toggle();
			});
			//[事件]删除
			$(".delete_subset").unbind("click").bind("click", function(){
				var id = $(this).parents(".publisher_panel").attr("c_id");
				$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$855/**确定删除本条经验活动配置？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							flightDeleteActConfigRequest(id);
						}
					});
			});
		}else{
			flightActConfigList.html('<p class="no_result">' + look._I18N_DATA.$313/**没有经验活动配置信息…**/ + '</p>');
		}
	}else{
		flightActConfigList.html('<p class="no_result">' + look._I18N_DATA.$313/**没有经验活动配置信息…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 新增&删除经验获得配置callback
//*************************************
var flightOperateActConfigCallback = function(back){
	if(back.code == 0){
		look.showInfo.right(back.code + look._I18N_DATA.$509/**：成功！**/);
		$.clearPop();
		$.clearPopDiv();
		flightGetActConfigCallback(back);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空
//* 发送PUSH callback
//*************************************
var flightSendPushCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		$("#chineseTextarea, #traditionalChineseTextarea, #englishTextarea, #dateInput").val("");
		publicInit.inputTipStyle("label input.text, label textarea", ".publisher_cell label tt");
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空 -> 系统维护
//* 获取callback
//*************************************
var flightMaintenanceCallback = function(back){
	if (back.code == 0) {
		if (back.data != undefined) {
			var statusHtml = '', subsetHtml = '';
			switch (back.data) {
				case 0:
					statusHtml = '<b class="color_green">正常</b>';
					subsetHtml = '<a href="javascript:" class="a_as_button a_as_red" id="modifyMaintenanceSubset" st="1">' + look._I18N_DATA.$674/**开启维护**/ + '</a>';
					break;
				case 1:
					statusHtml = '<b class="color_yellow">维护中</b>';
					subsetHtml = '<a href="javascript:" class="a_as_button a_as_gray" id="modifyMaintenanceSubset" st="0">' + look._I18N_DATA.$675/**取消维护**/ + '</a>';
					break;
				default:
					statusHtml = '<b class="color_gray">未知</b>'
			}
			$("#maintenanceStatusCell").html(statusHtml);
			publicInit.authenCheck(look._AUTHEN.misFlight, 33) ? $("#maintenanceSubsetCell").html(subsetHtml) : null;
			//[事件]开启&取消维护
			$("#modifyMaintenanceSubset").unbind("click").bind("click", function(){
				var status = $(this).attr("st");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$821/**确定要{operate}？**/.replace(/{operate}/ig, '<b class="color_red">' + $("#modifyMaintenanceSubset").text() + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$703/**重要提醒**/,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$887/**{operate}操作影响较大，继续吗？**/.replace(/{operate}/ig, '<b class="color_red">' + $("#modifyMaintenanceSubset").text() + '</b>') + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if(obj.hasClass("a_as_disabled")){return false;}
								obj.addClass("a_as_disabled");
								flightModifyMaintenanceRequest(status);
							}
						});
					}
				});
			});
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 航空 -> 系统维护
//* 修改callback
//*************************************
var flightModifyMaintenanceCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		flightMaintenanceRequest();
		look.showInfo.right(back.code + ":" + back.message);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** flight_mis Callback END ***/

/*** sail_mis Callback START ***/

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“礼包字典”callback
//*************************************
var sailGiftBagDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				look._SAIL_GIFT_BAG_DIC_ARRAY.length = 0;
				$.each(back.data, function(i, list){
					look._SAIL_GIFT_BAG_DIC_ARRAY.push(new Array(list.id, list.name, list.giftId, list.emailId, list.description));
				});
				sailGiftBagDictionaryCallback.Assay();
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$494/**：礼包字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay: function(){
		if ($("#sailGiftBagSelect").length != 0) {
			$("#sailGiftBagSelect").children().first().nextAll().remove();
			$.map(look._SAIL_GIFT_BAG_DIC_ARRAY, function(n){
				$("#sailGiftBagSelect").append('<option value="' + n[0] + '" title="' + n[4] + '" gift_id="' + n[2] + '" email_id="' + n[3] + '">' + n[1] + '</option>');
			});
			//[事件]选择预设回复
			$("#sailGiftBagSelect").unbind("change").bind("change", function(){
				var selectOption = $(this).val();
				if (selectOption == "") {
					$("#giftBagName, #prizeId, #emailId, #giftBagDescription").val("");
				}
				$.map(look._SAIL_GIFT_BAG_DIC_ARRAY, function(n){
					if (n[0] == selectOption) {$("#giftBagName").val(n[1]);$("#prizeId").val(n[2]);$("#emailId").val(n[3]);$("#giftBagDescription").val(n[4]);}
				});
				$("#giftBagDescription").focus();
				publicInit.inputTipStyle("label input.text, label textarea", ".publisher_cell label tt");
			});
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“消费类型字典”callback
//*************************************
var sailConsumeDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				look._SAIL_CONSUME_DIC_ARRAY.length = 0;
				$.each(back.data, function(i, list){
					look._SAIL_CONSUME_DIC_ARRAY.push(new Array(list.typeValue, list.typeName));
				});
				getConsumeRecordAssay(look._SAIL_CONSUME_DIC_ARRAY);
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$450/**：消费类型字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“支付类型字典”callback
//*************************************
var sailBuckDictionaryCallback = {
	Convert : function(back){
		if (back.code == 0) {
			if (back.data != "") {
				look._SAIL_BUCK_DIC_ARRAY.length = 0;
				$.each(back.data, function(i, list){
					look._SAIL_BUCK_DIC_ARRAY.push(new Array(list.typeValue, list.typeName));
				});
				getBuckRecordAssay(look._SAIL_BUCK_DIC_ARRAY);
			}else{
				look.showInfo.error(back.code + look._I18N_DATA.$451/**：支付类型字典数据为空…**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“任务类型字典”callback
//*************************************
var sailTaskDictionaryCallback = {
	Convert : function(back){
		if(back.code == 0){
			look._SAIL_TASK_DIC_ARRAY = JSON.stringify(back);
			sailTaskDictionaryCallback.Assay("list");
			sailTaskDictionaryCallback.Assay("select");
		}else{
			look._SAIL_TASK_DIC_ARRAY.length = 0;
			look.showInfo.error(look._I18N_DATA.$495/**获取任务类型字典失败…**/);	
		}
	},
	Assay : function(type){
		var back = $.parseJSON(look._SAIL_TASK_DIC_ARRAY),
			taskTypeSelect = $("select[task_type]"), taskTypeElement = $("*:not(select)[task_type]");
		if(back){
			if(type == "select"){
				taskTypeSelect.each(function(){
					var type = $(this).attr("task_type"), thisElement = $(this);
					thisElement.children().first().nextAll().remove();
					$.each(back.data, function(i, list){
						var selectedHtml = (list.typeValue == thisElement.attr("task_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.typeValue + '"' + selectedHtml + '>' + list.typeName + '</option>');
					});
				});
			}
			if(type == "list"){
				$.each(back.data, function(i, list){
					taskTypeElement.each(function(){
						var type = $(this).attr("task_type");
						if(list.typeValue == type){
							$(this).text(list.typeName);return;
						}
					})
				});
			}
		}else{
			look.showInfo.error(look._I18N_DATA.$498/**获取相关字典数据失败，请重新操作…**/);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“奖励类型字典”callback
//*************************************
var sailRewardDictionaryCallback = {
	Convert : function(back){
		if(back.code == 0){
			look._SAIL_REWARD_DIC_ARRAY = JSON.stringify(back);
			sailRewardDictionaryCallback.Assay("list");
			sailRewardDictionaryCallback.Assay("select");
		}else{
			look._SAIL_TASK_DIC_ARRAY.length = 0;
			look.showInfo.error(look._I18N_DATA.$496/**获取奖励类型字典失败…**/);	
		}
	},
	Assay : function(type){
		var back = $.parseJSON(look._SAIL_REWARD_DIC_ARRAY),
			rewardTypeSelect = $("select[reward_type]"), rewardTypeElement = $("*:not(select)[reward_type]");
		if(back){
			if(type == "select"){
				rewardTypeSelect.each(function(){
					var type = $(this).attr("reward_type"), thisElement = $(this);
					thisElement.children().first().nextAll().remove();
					$.each(back.data, function(i, list){
						var selectedHtml = (list.typeValue == thisElement.attr("reward_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.typeValue + '"' + selectedHtml + '>' + list.typeName + '</option>');
					});
				});
			}
			if(type == "list"){
				$.each(back.data, function(i, list){
					rewardTypeElement.each(function(){
						type = $(this).attr("reward_type");
						if(list.typeValue == type){
							$(this).text(list.typeName);return;
						}
					})
				});
			}
		}else{
			look.showInfo.error(look._I18N_DATA.$498/**获取相关字典数据失败，请重新操作…**/);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“跳转类型字典”callback
//*************************************
var sailGotoDictionaryCallback = {
	Convert : function(back){
		if(back.code == 0){
			look._SAIL_GOTO_DIC_ARRAY = JSON.stringify(back);
			sailGotoDictionaryCallback.Assay("list");
			sailGotoDictionaryCallback.Assay("select");
		}else{
			look._SAIL_GOTO_DIC_ARRAY.length = 0;
			look.showInfo.error(look._I18N_DATA.$497/**获取跳转类型字典失败…**/);	
		}
	},
	Assay : function(type){
		var back = $.parseJSON(look._SAIL_GOTO_DIC_ARRAY),
			gotoTypeSelect = $("select[goto_type]"), gotoTypeElement = $("*:not(select)[goto_type]");
		if(back){
			if(type == "select"){
				gotoTypeSelect.each(function(){
					var type = $(this).attr("goto_type"), thisElement = $(this);
					thisElement.children().first().nextAll().remove();
					$.each(back.data, function(i, list){
						var selectedHtml = (list.typeValue == thisElement.attr("goto_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.typeValue + '"' + selectedHtml + '>' + list.typeName + '</option>');
					});
				});
			}
			if(type == "list"){
				$.each(back.data, function(i, list){
					gotoTypeElement.each(function(){
						var type = $(this).attr("goto_type");
						if(list.typeValue == type){
							$(this).text(list.typeName);return;
						}
					})
				});
			}
		}else{
			look.showInfo.error(look._I18N_DATA.$498/**获取相关字典数据失败，请重新操作…**/);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“补偿类型字典”callback
//*************************************
var sailCompensationDictionaryCallback = {
	Convert : function(back){
		if(back.code == 0){
			look._SAIL_COMPENSATION_DIC_ARRAY = JSON.stringify(back);
			sailCompensationDictionaryCallback.Assay("list");
			sailCompensationDictionaryCallback.Assay("select");
		}else{
			look._SAIL_COMPENSATION_DIC_ARRAY.length = 0;
			look.showInfo.error(look._I18N_DATA.$540/**获取补偿类型字典失败…**/);	
		}
	},
	Assay : function(type){
		var back = $.parseJSON(look._SAIL_COMPENSATION_DIC_ARRAY),
			compensationTypeSelect = $("select[compensation_type]"), compensationTypeElement = $("*:not(select)[compensation_type]");
		if(back){
			if(type == "select"){
				compensationTypeSelect.each(function(){
					var type = $(this).attr("compensation_type"), thisElement = $(this);
					thisElement.children().first().nextAll().remove();
					$.each(back.data, function(i, list){
						var selectedHtml = (list.id == thisElement.attr("compensation_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.id + '"' + selectedHtml + '>' + list.name + '</option>');
					});
				});
			}
			if(type == "list"){
				$.each(back.data, function(i, list){
					compensationTypeElement.each(function(){
						var type = $(this).attr("compensation_type");
						if(list.id == type){
							$(this).text(list.name);return;
						}
					})
				});
			}
		}else{
			look.showInfo.error(look._I18N_DATA.$498/**获取相关字典数据失败，请重新操作…**/);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“服务器字典”callback
//*************************************
var sailServerDictionaryCallback = {
	Convert : function(back){
		if(back.code == 0){
			look._SAIL_SERVER_DIC_ARRAY = JSON.stringify(back);
			sailServerDictionaryCallback.Assay("select");
		}else{
			look._SAIL_SERVER_DIC_ARRAY.length = 0;
			look.showInfo.error(look._I18N_DATA.$528/**获取服务器字典失败…**/);	
		}
	},
	Assay : function(type){
		var back = $.parseJSON(look._SAIL_SERVER_DIC_ARRAY),
			serverSelect = $("select[server_type]"), serverElement = $("*:not(select)[server_type]");
		if(back){
			if(type == "select"){
				serverSelect.each(function(){
					var type = $(this).attr("server_type"), thisElement = $(this);
					thisElement.children().first().nextAll().remove();
					$.each(back.data, function(i, list){
						var selectedHtml = (list.typeValue == thisElement.attr("server_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.type + '"' + selectedHtml + ' title="' + list.typeValue+ '">' + list.typeName + '</option>');
					});
				});
			}
			if(type == "list"){
				$.each(back.data, function(i, list){
					serverElement.each(function(){
						var type = $(this).attr("server");
						if(list.typeValue == type){
							$(this).text(list.typeName);return;
						}
					})
				});
			}
		}else{
			look.showInfo.error(look._I18N_DATA.$498/**获取相关字典数据失败，请重新操作…**/);
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 字典
//* 获取“扩展字典”callback
//*************************************
var sailExtendDictionaryCallback = {
	ContentFn : null,
	Type : null,
	Meta : null,
	Check : function(type, callback, meta){
		sailExtendDictionaryCallback.Type = type;
		sailExtendDictionaryCallback.Meta = meta;
		if(typeof(look._SAIL_EXTEND_DIC) == "undefined"){
			Look.prototype._SAIL_EXTEND_DIC = new Object();
		}
		$.isEmptyObject(look._SAIL_EXTEND_DIC) || !look._SAIL_EXTEND_DIC[type] ? sailGetDictionaryRequest(type) : typeof(callback) == "function" ? callback() : null;
	},
	Convert : function(back){
		var type = sailExtendDictionaryCallback.Type;
		if (back.code == 0) {
			if (back.data.length != 0) {
				look._SAIL_EXTEND_DIC[type] = back.data;
				sailExtendDictionaryCallback.Assay();
			} else {
				look.showInfo.error(back.code + "：" + type + look._I18N_DATA.$7023/**字典数据为空**/);
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	Assay : function(){
		var type = sailExtendDictionaryCallback.Type;
		var meta = sailExtendDictionaryCallback.Meta;
		var metaSelect = $("select[" + type + "_type]"), metaElement = $("*:not(select)[" + type + "_type]");
		if(meta == "select"){
			metaSelect.each(function(){
				var thisElement = $(this);
				thisElement.children().first().nextAll().remove();
				$.each(look._SAIL_EXTEND_DIC[type], function(i, list){
					if (typeof(sailExtendDictionaryCallback.ContentFn) == "function") {
						sailExtendDictionaryCallback.ContentFn(thisElement, i, list);
					} else {
						var selectedHtml = (list.id == thisElement.attr(type + "_type") ? ' selected="selected"' : '');
						thisElement.append('<option value="' + list.id + '"' + selectedHtml + ' title="' + list.name + '">' + list.name + '</option>');
					}
				});
			});
		}
		if(meta == "list"){
			$.each(look._SAIL_EXTEND_DIC[type], function(i, list){
				metaElement.each(function(){
					var elementType = $(this).attr(type + "_type");
					if(typeof(sailExtendDictionaryCallback.ContentFn) == "function"){
						sailExtendDictionaryCallback.ContentFn($(this), i, list);
					}else{
						if(list.id == elementType){
							$(this).text(list.name);return;
						}
					}
				})
			});
		}
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“玩家信息”callback
//*************************************
var sailGetUserInfoCallback = function(back){
	var sailUserInfoList = $("#sailUserInfoList");
	sailUserInfoList.empty();
	if(back.code == 0){
		if (back.data.length != 0) {
			var isBuyBucks = "", isBuyBucksHtml = "", type = "", typeHtml = "", isBuyBucksSelectHtml = "", checkedClass = "";
			initLoader.sailCommonFunction.chooseUserOperate.init();
			$.each(back.data, function(i, list){
				isBuyBucks = list.isBuyBucks;
				type = list.type;
				if(isBuyBucks == 0){
					isBuyBucksHtml = '<b class="color_red">' + look._I18N_DATA.$723/**未充值**/ + '</b>';
					isBuyBucksSelectHtml = '<select name="isBuyBucks"><option value="0" selected="selected">' + look._I18N_DATA.$723/**未充值**/ + '</option><option value="1">' + look._I18N_DATA.$722/**已充值**/ + '</option></select>'
				}else if(isBuyBucks == 1){
					isBuyBucksHtml = '<b class="color_green">' + look._I18N_DATA.$722/**已充值**/ + '</b>';
					isBuyBucksSelectHtml = '<select name="isBuyBucks"><option value="0">' + look._I18N_DATA.$723/**未充值**/ + '</option><option value="1" selected="selected">' + look._I18N_DATA.$722/**已充值**/ + '</option></select>'
				}else {
					isBuyBucksHtml = '/';
					isBuyBucksSelectHtml = '<select name="isBuyBucks"><option value="0">' + look._I18N_DATA.$723/**未充值**/ + '</option><option value="1">' + look._I18N_DATA.$722/**已充值**/ + '</option></select>'
				}
				if(type == 1){
					typeHtml = look._I18N_DATA.$990/**试玩用户**/;
				}else if(type == 2){
					typeHtml = look._I18N_DATA.$991/**正式用户**/;
				}else {
					typeHtml = look._I18N_DATA.$992/**未知用户**/;
				}
				checkedClass = $.map(look._SAIL_CHOOSED_USER_ARRAY, function(n){
					return n == list.playerCenterId ? ' checked="checked"' : null;
				});
				sailUserInfoList.append(
					'<tr>' +
					'	<td><label><input type="checkbox" class="checkbox" ' + checkedClass + ' p_id="' + list.playerCenterId + '"/>' + list.playerCenterId + '</label></td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.name + '</td>' +
					'	<td>' + typeHtml + '</td>' +
					'	<td>' + (list.email ? list.email : "/") + '</td>' +
					'	<td>' + list.countryCode + '</td>' +
					'	<td>' + list.locale + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.exp + '</td>' +
					'	<td>' + list.money + '</td>' +
					'	<td>' + list.sceneIndex + '</td>' +
					'	<td>' + list.pierSceneIndex + '</td>' +
					'	<td>' + list.storeLevel + '</td>' +
					'	<td>' + list.createdAt + '</td>' +
					'	<td>' + list.updatedAt + '</td>' +
					'	<td>' + (list.ip ? list.ip : "/") + '</td>' +
					'	<td is_buy="' + isBuyBucks + '">' + isBuyBucksHtml + '</td>' +
					'	<td>' + (publicInit.authenCheck(look._AUTHEN.misSail, 21) ? '<a href="javascript:" class="a_as_button modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : 'N/A') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 83)
					|| publicInit.authenCheck(look._AUTHEN.misSail, 85)
					|| publicInit.authenCheck(look._AUTHEN.misSail, 89)
					|| publicInit.authenCheck(look._AUTHEN.misSail, 91)
					  ? '　<a href="javascript:" class="a_as_button a_as_gray operate_subset" uid="' + list.id + '">' + look._I18N_DATA.$36/**操作**/ + '</a>' : '') + 
					'	</td>' +
					'</tr>' +
					'<tr class="hidden" p_id="' + list.playerCenterId + '" u_id="' + list.id + '">' +
					'	<td><input type="hidden" value="' + list.id + '" name="id"/>' + list.playerCenterId + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td><input type="text" class="text" value="' + list.name + '" name="name" /></td>' +
					'	<td>' + typeHtml + '</td>' +
					'	<td>' + (list.email ? list.email : "/") + '</td>' +
					'	<td>' + list.countryCode + '</td>' +
					'	<td>' + list.locale + '</td>' +
					'	<td><input type="text" class="text veryshort" value="' + list.level + '" name="level" /></td>' +
					'	<td><input type="text" class="text" value="' + list.exp + '" name="exp" /></td>' +
					'	<td><input type="text" class="text" value="' + list.money + '" name="money" /></td>' +
					'	<td>' + list.sceneIndex + '</td>' +
					'	<td>' + list.pierSceneIndex + '</td>' +
					'	<td><input type="text" class="text veryshort" value="' + list.storeLevel + '" name="storeLevel" /></td>' +
					'	<td>' + list.createdAt + '</td>' +
					'	<td>' + list.updatedAt + '</td>' +
					'	<td>' + (list.ip ? list.ip : "/") + '</td>' +
					'	<td>' + isBuyBucksSelectHtml + '</td>' +
					'	<td><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			initLoader.sailCommonFunction.chooseUserOperate.assy();
			//[事件]修改信息
			$(".modify_subset").bind("click", function(){
				$(this).parents("tr").toggle().next().toggle().find("input.text:first").focus();
			});
			$(".cancel_subset").bind("click", function(){
				$(this).parents("tr").toggle().prev().toggle();
			});
			//[事件]确定修改
			$(".confirm_modify_subset").bind("click", function(){
				var inputObj = $(this).parents("tr").find("select[name], input[name]");
				var param = '';
				inputObj.each(function(){
					param += '&' + $(this).attr("name") + '=' + $.trim($(this).val());
				});
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$827/**确定修改数据？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyUserInfoRequest(param);
					}
				});
			});
			//[事件]批量选择checkbox
			$("#sailUserInfoList input.checkbox").unbind("click").bind("click", function(){
				var pId = $(this).attr("p_id");
				if($(this).is(":checked")){
					initLoader.sailCommonFunction.chooseUserOperate.add(pId);
				}else{
					initLoader.sailCommonFunction.chooseUserOperate.remove(pId);
				}
				initLoader.sailCommonFunction.chooseUserOperate.set();
				initLoader.sailCommonFunction.chooseUserOperate.assy();
			});
			var operateEventBind = function(uid){
				//[事件]vip信息
				$(".get_vip_subset").unbind("click").bind("click", function(){
					$.lookPop({
						type: -1,
						title: look._I18N_DATA.$1260/**VIP信息**/,
						html: '<div class="operation_wrapper" id="sailUserVipInfoList"><p class="load_result"><img src="../images/small_loader.gif" class="loader_icon" /></p></div>'
					});
					sailGetUserVipInfoRequest(uid);
				});
				//[事件]pve信息
				$(".get_pve_subset").unbind("click").bind("click", function(){
					$.lookPop({
						type: -1,
						title: look._I18N_DATA.$1261/**PVE信息**/,
						html: '<div class="operation_wrapper" id="sailUserPveInfoList"><p class="load_result"><img src="../images/small_loader.gif" class="loader_icon" /></p></div>'
					});
					sailGetUserPveInfoRequest(uid);
				});
				//[事件]PVP积分信息
				$(".get_pvp_mark_subset").unbind("click").bind("click", function(){
					$.lookPop({
						type: -1,
						title: look._I18N_DATA.$1270/**PVP积分信息**/,
						html: '<div class="operation_wrapper" id="sailUserPvpMarkList"><p class="load_result"><img src="../images/small_loader.gif" class="loader_icon" /></p></div>'
					});
					sailGetUserPvpMarkRequest(uid);
				});
				//[事件]图纸信息
				$(".get_blueprint__subset").unbind("click").bind("click", function(){
					$.lookPop({
						type: -1,
						title: look._I18N_DATA.$1265/**图纸信息**/,
						html: 
							'<div class="operation_wrapper"><div class="operation_table">' +
							'<table cellpadding="0" cellspacing="0" class="list">' +
							'	<thead>' +
							'		<tr>' +
							'			<th>' + look._I18N_DATA.$712/**编号**/ + '</th>' +
							'			<th>' + look._I18N_DATA.$1268/**图纸ID**/ + '</th>' +
							'			<th>' + look._I18N_DATA.$1266/**图纸类型**/ + '</th>' +
							'			<th>' + look._I18N_DATA.$1267/**图纸数量**/ + '</th>' +
							'		</tr>' +
							'	</thead>' +
							'	<tbody id="sailUserBlueprintList">' +
							'		<tr><td colspan="4"><img src="../images/small_loader.gif" /></td></tr>' +
							'	</tbody>' +
							'</table>' +
							'</div></div>'
					});
					sailGetUserBlueprintRequest(uid);
				});
			}
			//[事件]弹出操作菜单
			$(".operate_subset").unbind("click").bind("click", function(){
				var obj = $(this), uid = obj.attr("uid");
				publicInit.menuPoper(
					[
						publicInit.authenCheck(look._AUTHEN.misSail, 83) ? '<p><a href="javascript:" class="get_vip_subset">' + look._I18N_DATA.$1260/**VIP信息**/ + '</a></p>' : '',
						publicInit.authenCheck(look._AUTHEN.misSail, 85) ? '<p><a href="javascript:" class="get_pve_subset">' + look._I18N_DATA.$1261/**PVE信息**/ + '</a></p>' : '',
						publicInit.authenCheck(look._AUTHEN.misSail, 91) ? '<p><a href="javascript:" class="get_pvp_mark_subset">' + look._I18N_DATA.$1270/**PVP积分信息**/ + '</a></p>' : '',
						publicInit.authenCheck(look._AUTHEN.misSail, 89) ? '<p><a href="javascript:" class="get_blueprint__subset">' + look._I18N_DATA.$1265/**图纸信息**/ + '</a></p>' : ''
					],
					obj.offset().left + obj.outerWidth(),
					obj.offset().top + 20,
					function(){
						operateEventBind(uid);
					}
				);
			});
		}else{
			sailUserInfoList.append('<tr><td colspan="18">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailUserInfoList.append('<tr><td colspan="18">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 修改“玩家信息”callback
//*************************************
var sailModifyUserInfoCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$500/**：玩家信息修改成功…**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“玩家vip信息”callback
//*************************************
var sailGetUserVipInfoCallback = function(back){
	var sailUserVipInfoList = $("#sailUserVipInfoList");
	if(back.code == 0){
		if (back.data){
			var vipExpire = back.data.vipExpireTs != "" ? back.data.vipExpireTs.split(" ") : ['', ''];
			var vipExpireHtml = '<input type="text" class="text short" id="vipExpireDateInput" maxlength="10" value="' + vipExpire[0] + '" /><input id="vipExpireTimeInput" class="text middleshort" type="text" value="' + vipExpire[1] + '" maxlength="8">';
			sailUserVipInfoList.html(
				'<div class="form">' +
				'	<div class="result_info">' +
				'		<p><span class="left">' + look._I18N_DATA.$2125/**vip类型：**/ + '</span><span>' + back.data.vipType + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2126/**vip过期时间：**/ + '</span><span>' + back.data.vipExpireTs + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2127/**购买能量包数量：**/ + '</span><span>' + back.data.buyEnergyNum + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2128/**购买能量包时间：**/ + '</span><span>' + back.data.buyEnergyDate + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2129/**挑战购买次数：**/ + '</span><span>' + back.data.pvpBuyNum + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2130/**挑战剩余次数：**/ + '</span><span>' + back.data.pvpFightNum + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2131/**挑战更新时间：**/ + '</span><span>' + back.data.pvpDate + '</span></p>' +
				'	</div>' +
				(publicInit.authenCheck(look._AUTHEN.misSail, 84) ? '<div class="operation_button"><a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a></div>' : '') +
				'</div>' +
				'<div class="form look_hidden"><form>' +
				'	<input type="hidden" name="playerId" value="' + back.data.playerId + '" />' +
				'	<div class="result_info">' +
				'		<p><span class="left">' + look._I18N_DATA.$2125/**vip类型：**/ + '</span><span>' + back.data.vipType + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2126/**vip过期时间：**/ + '</span><span>' + vipExpireHtml + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2127/**购买能量包数量：**/ + '</span><span><input type="text" class="text" name="buyEnergyNum" value="' + back.data.buyEnergyNum + '" /></span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2128/**购买能量包时间：**/ + '</span><span>' + back.data.buyEnergyDate + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2129/**挑战购买次数：**/ + '</span><span><input type="text" class="text" name="pvpBuyNum" value="' + back.data.pvpBuyNum + '" /></span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2130/**挑战剩余次数：**/ + '</span><span><input type="text" class="text" name="pvpFightNum" value="' + back.data.pvpFightNum + '" /></span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2131/**挑战更新时间：**/ + '</span><span>' + back.data.pvpDate + '</span></p>' +
				'	</div>' +
				'	<div class="operation_button"><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></div>' +
				'</form></div>'
			)
			$.positionDiv();
			contrastDatepickerGetter("#vipExpireDateInput");
			//[事件]修改信息
			$("#sailUserVipInfoList .modify_subset").bind("click", function(){
				$(this).parents(".form").toggle().next().toggle().find("input.text:first").focus();
			});
			$("#sailUserVipInfoList .cancel_subset").bind("click", function(){
				$(this).parents(".form").toggle().prev().toggle();
			});
			//[事件]确定修改
			$("#sailUserVipInfoList .confirm_modify_subset").bind("click", function(){
				var param = $(this).parents("form").serialize() + "&vipExpireTs=" + $.trim($("#vipExpireDateInput").val()) + " " + $.trim($("#vipExpireTimeInput").val());
				if($(this).hasClass("a_as_disabled")){return false;}
				$(this).addClass("a_as_disabled");
				sailModifyUserVipInfoRequest(param);
			});
		}else{
			sailUserVipInfoList.html('<p class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</p>');
		}
	}else{
		sailUserVipInfoList.html('<p class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 修改“玩家vip信息”callback
//*************************************
var sailModifyUserVipInfoCallback = function(back){
	if(back.code == 0){
		look.showInfo.right(back.code + look._I18N_DATA.$7011/**：修改成功…**/);
		sailGetUserVipInfoRequest(look._SAIL_USER_INFO.Get_UID());
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var sailModifyUserVipInfoComplete = function(){
	$("#sailUserVipInfoList .confirm_modify_subset").removeClass("a_as_disabled");
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“玩家pve信息”callback
//*************************************
var sailGetUserPveInfoCallback = function(back){
	var sailUserPveInfoList = $("#sailUserPveInfoList");
	if(back.code == 0){
		if (back.data){
			sailUserPveInfoList.html(
				'<div class="form">' +
				'	<div class="result_info">' +
				'		<p><span class="left">' + look._I18N_DATA.$2132/**最后进行关卡：**/ + '</span><span>' + back.data.lastCampaign + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2133/**最后进行关卡信息：**/ + '</span><span>' + back.data.lastCampaignInfo + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2134/**最后进行关卡步骤：**/ + '</span><span>' + back.data.lastCampaignStep + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2135/**最后进行章节：**/ + '</span><span>' + back.data.lastChapter + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2136/**是否需要复活：**/ + '</span><span>' + (back.data.needFix == 0 ? "否" : "是") + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2137/**PVE新手步骤：**/ + '</span><span>' + back.data.tutorialStep + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2138/**最新解锁关卡：**/ + '</span><span>' + back.data.unlockCampaign + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2139/**最新解锁章节：**/ + '</span><span>' + back.data.unlockChapter + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2140/**最新解锁章节是否完成：**/ + '</span><span>' + (back.data.unlockChapterFinished == 0 ? "否" : "是") + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2141/**最后进行时间：**/ + '</span><span>' + back.data.updatedAt + '</span></p>' +
				'	</div>' +
				(publicInit.authenCheck(look._AUTHEN.misSail, 86) ? '<div class="operation_button"><a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a></div>' : '') +
				'</div>' +
				'<div class="form look_hidden"><form>' +
				'	<input type="hidden" name="playerId" value="' + back.data.playerId + '" />' +
				'	<div class="result_info">' +
				'		<p><span class="left">' + look._I18N_DATA.$2132/**最后进行关卡：**/ + '</span><span>' + back.data.lastCampaign + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2133/**最后进行关卡信息：**/ + '</span><span>' + back.data.lastCampaignInfo + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2134/**最后进行关卡步骤：**/ + '</span><span>' + back.data.lastCampaignStep + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2135/**最后进行章节：**/ + '</span><span>' + back.data.lastChapter + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2136/**是否需要复活：**/ + '</span><span>' + (back.data.needFix == 0 ? "否" : "是") + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2137/**PVE新手步骤：**/ + '</span><span>' + back.data.tutorialStep + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2138/**最新解锁关卡：**/ + '</span><span><input type="text" class="text" name="unlockCampaign" value="' + back.data.unlockCampaign + '" /></span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2139/**最新解锁章节：**/ + '</span><span><input type="text" class="text" name="unlockChapter" value="' + back.data.unlockChapter + '" /></span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2140/**最新解锁章节是否完成：**/ + '</span><span>' + (back.data.unlockChapterFinished == 0 ? "否" : "是") + '</span></p>' +
				'		<p><span class="left">' + look._I18N_DATA.$2141/**最后进行时间：**/ + '</span><span>' + back.data.updatedAt + '</span></p>' +
				'	</div>' +
				'	<div class="operation_button"><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></div>' +
				'</form></div>'
			)
			$.positionDiv();
			//[事件]修改信息
			$("#sailUserPveInfoList .modify_subset").bind("click", function(){
				$(this).parents(".form").toggle().next().toggle().find("input.text:first").focus();
			});
			$("#sailUserPveInfoList .cancel_subset").bind("click", function(){
				$(this).parents(".form").toggle().prev().toggle();
			});
			//[事件]确定修改
			$("#sailUserPveInfoList .confirm_modify_subset").bind("click", function(){
				var param = $(this).parents("form").serialize();
				if($(this).hasClass("a_as_disabled")){return false;}
				$(this).addClass("a_as_disabled");
				sailModifyUserPveInfoRequest(param);
			});
		}else{
			sailUserPveInfoList.html('<p class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</p>');
		}
	}else{
		sailUserPveInfoList.html('<p class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 修改“玩家pve信息”callback
//*************************************
var sailModifyUserPveInfoCallback = function(back){
	if(back.code == 0){
		look.showInfo.right(back.code + look._I18N_DATA.$7011/**：修改成功…**/);
		sailGetUserPveInfoRequest(look._SAIL_USER_INFO.Get_UID());
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var sailModifyUserPveInfoComplete = function(){
	$("#sailUserPveInfoList .confirm_modify_subset").removeClass("a_as_disabled");
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 玩家pvp积分信息
//* 获取callback
//*************************************
var sailGetUserPvpMarkCallback = function(back){
	var listCell = $("#sailUserPvpMarkList");
	if(back.code == 0){
		if (back.data){
			listCell.html(
				'<div class="result_info">' +
				'	<p><span class="left">' + look._I18N_DATA.$2144/**总共赢的场数：**/ + '</span><span>' + back.data.totalWin + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2145/**总共输的场数：**/ + '</span><span>' + back.data.totalLose + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2146/**今天连赢的场数：**/ + '</span><span>' + back.data.todayContinuousWin + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2147/**今天连输的场数：**/ + '</span><span>' + back.data.todayContinuousLose + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2148/**今天赢的场数：**/ + '</span><span>' + back.data.todayWin + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2149/**今天输的场数：**/ + '</span><span>' + back.data.todayLose + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2150/**昨天赢的场数：**/ + '</span><span>' + back.data.yesterdayWin + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2151/**昨天输的场数：**/ + '</span><span>' + back.data.yesterdayLose + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2152/**总积分：**/ + '</span><span>' + back.data.mark + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2153/**级别：**/ + '</span><span>' + back.data.level + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2154/**今天的分数：**/ + '</span><span>' + back.data.todayMark + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2155/**最后更新分数时间：**/ + '</span><span>' + back.data.lastUpdateMarkAt + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2015/**创建时间：**/ + '</span><span>' + back.data.createdAt + '</span></p>' +
				'	<p><span class="left">' + look._I18N_DATA.$2016/**更新时间：**/ + '</span><span>' + back.data.updatedAt + '</span></p>' +
				'</div>'
			)
			$.positionDiv();
		}else{
			listCell.html('<p class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</p>');
		}
	}else{
		listCell.html('<p class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 玩家图纸信息
//* 获取callback
//*************************************
var sailGetUserBlueprintCallback = function(back){
	var listCell = $("#sailUserBlueprintList");
	listCell.empty();
	if (back.code == 0) {
		if (back.data && back.data.length != 0) {
			$.each(back.data, function(i, list){
				listCell.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.blueprintId + '</td>' +
					'	<td blueprinttype_type="' + list.blueprintId + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
					'	<td>' + list.num + '</td>' +
					'</tr>'
				);
			});
			sailExtendDictionaryCallback.Check("blueprinttype", sailExtendDictionaryCallback.Assay, "list");
		}else{
			listCell.append('<tr><td colspan="4">' + look._I18N_DATA.$316/**没有任何数据…**/ + '</td></tr>');
		}
	}else{
		listCell.append('<tr><td colspan="4">' + look._I18N_DATA.$316/**没有任何数据…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 商船信息
//* 获取callback
//*************************************
var sailGetMerchantShipCallback = function(back){
	var cellList = $("#sailMerchantShipList");
	cellList.empty();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (publicInit.authenCheck(look._AUTHEN.misSail, 93)) {
			$("#sailMerchantShipCell").show();
			sailExtendDictionaryCallback.Check("ship", sailExtendDictionaryCallback.Assay, "select");
		}
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				switch(list.status){
					case 0 : statusHtml = look._I18N_DATA.$993/**背包**/;
						break;
					case 1 : statusHtml = look._I18N_DATA.$994/**航行**/;
						break;
					default : statusHtml = look._I18N_DATA.$10/**未知**/;
				}
				cellList.append(
					'<tr m_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.typeKey + '</td>' +
					'	<td>' + list.name + '</td>' +
					'	<td st="' + list.status + '">' + statusHtml + '</td>' +
					'	<td>' + (list.plot == -1 ? look._I18N_DATA.$1001/**背包**/ : look._I18N_DATA.$1002/**码头**/ + list.plot) + '</td>' +
					'	<td>' + list.createdAt + '</td>' +
					'	<td>' + list.cooldownCompleteTime + '</td>' +
					'	<td><a href="javascript:" class="a_as_button a_as_disabled delete_subset">' + look._I18N_DATA.$638/**删除**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]删除
			$(".delete_subset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var element = $(this).parents("tr"), playerId = element.attr("uid"), boatId = element.attr("boat_id");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$829/**确定删除该船只？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteMerchantShipRequest(boatId, playerId);
					}
				});
			});
		}else{
			cellList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		cellList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 商船信息
//* 添加callback
//*************************************
var sailAddMerchantShipCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
		$("#addCountInput").val("");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 商船信息
//* 删除callback
//*************************************
var sailDeleteMerchantShipCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$516/**：删除成功…**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“玩家航线信息”callback
//*************************************
var sailGetUserLaneCallback = function(back){
	var sailUserLaneList = $("#sailUserLaneList");
	sailUserLaneList.empty();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			var isCooldown = "", isCooldownHtml = "", status = "", statusHtml = "";
			$.each(back.data, function(i, list){
				isCooldown = list.isCooldown;
				status = list.status;
				if(isCooldown == 0){
					isCooldownHtml = '<b class="color_yellow">' + look._I18N_DATA.$995/**未冷却**/ + '</b>';
				}else if(isCooldown == 1){
					isCooldownHtml = '<b class="color_green">' + look._I18N_DATA.$996/**已冷却**/ + '</b>';
				}
				switch(status){
					case 0 : statusHtml = look._I18N_DATA.$997/**自家等收获**/;
						break;
					case 1 : statusHtml = look._I18N_DATA.$998/**友家等收获**/;
						break;
					case 2 : statusHtml = look._I18N_DATA.$999/**等待起航**/;
						break;
					case 3 : statusHtml = look._I18N_DATA.$1000/**等待返航**/;
						break;
					default : statusHtml = look._I18N_DATA.$10/**未知**/;
				}
				sailUserLaneList.append(
					'<tr uid="' + list.playerId + '" lane_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.shipKey + '</td>' +
					'	<td>' + list.startTime + '</td>' +
					'	<td>' + list.arriveTime + '</td>' +
					'	<td st="' + status + '">' + statusHtml + '</td>' +
					'	<td>' + list.startPlayerName + '</td>' +
					'	<td>' + list.endPlayerName + '</td>' +
					'	<td is_cool="' + isCooldown + '">' + isCooldownHtml + '</td>' +
					'	<td>' + (list.cooldownOverTime ? list.cooldownOverTime : "N/A") + '</td>' +
					'	<td><a href="javascript:" class="a_as_button a_as_disabled delete_subset">' + look._I18N_DATA.$638/**删除**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]删除
			$(".delete_subset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var element = $(this).parents("tr"), playerId = element.attr("uid"), laneId = element.attr("lane_id");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$830/**确定删除该航线？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteUserLaneRequest(laneId, playerId);
					}
				});
			});
		}else{
			sailUserLaneList.append('<tr><td colspan="11">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailUserLaneList.append('<tr><td colspan="11">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 删除“玩家航线信息”callback
//*************************************
var sailDeleteUserLaneCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$502/**：删除航线成功…**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 建筑信息
//* 获取callback
//*************************************
var sailGetUserBuildCallback = function(back){
	var sailUserBuildList = $("#sailUserBuildList");
	sailUserBuildList.empty();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (publicInit.authenCheck(look._AUTHEN.misSail, 90)) {
			$("#sailBuildingCell").show();
			sailExtendDictionaryCallback.Check("building", sailExtendDictionaryCallback.Assay, "select");
		}
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				sailUserBuildList.append(
					'<tr o_key="' + list.ownerKey + '" build_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.startTime + '</td>' +
					'	<td>' + list.status + '</td>' +
					'	<td>' + list.plot + '</td>' +
					'	<td>' + list.typeValue + '</td>' +
					'	<td>' + (list.nextProfitTime ? list.nextProfitTime : "N/A") + '</td>' +
					'	<td><a href="javascript:" class="a_as_button a_as_disabled delete_subset">' + look._I18N_DATA.$638/**删除**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]删除
			$(".delete_subset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var element = $(this).parents("tr"), ownerKey = element.attr("o_key"), buildId = element.attr("build_id");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$831/**确定删除该建筑？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteUserBuildRequest(buildId, ownerKey);
					}
				});
			});
		}else{
			sailUserBuildList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailUserBuildList.append('<tr><td colspan="9">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 建筑信息
//* 添加callback
//*************************************
var sailAddUserBuildCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
		$("#addCountInput").val("");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 建筑信息
//* 删除callback
//*************************************
var sailDeleteUserBuildCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$503/**：删除建筑成功…**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 战船信息
//* 获取callback
//*************************************
var sailGetBattleShipCallback = function(back){
	var sailBattleShipList = $("#sailBattleShipList");
	sailBattleShipList.empty();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (publicInit.authenCheck(look._AUTHEN.misSail, 92)) {
			$("#sailBattleShipCell").show();
			sailExtendDictionaryCallback.Check("battleShipShootType", sailExtendDictionaryCallback.Assay, null);
			sailExtendDictionaryCallback.Check("battleshiptype", sailExtendDictionaryCallback.Assay, "select");
		}
		//战船零件信息
		if(publicInit.authenCheck(look._AUTHEN.misSail, 43)){$("#viewPartCell").show();}
		//木材信息
		if(publicInit.authenCheck(look._AUTHEN.misSail, 94)){$("#viewWoodsCell").show();}
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				sailBattleShipList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.typeKey + '</td>' +
					'	<td battleshiptype_type="' + list.typeKey + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
					'	<td>' + list.skillId + '</td>' +
					'	<td battleShipShootType_type="' + list.skillId + '" ship_id="' + list.typeKey + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
					'	<td>' + (list.captainId ? list.captainId : "N/A") + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.status + '</td>' +
					'	<td>' + (list.plot == -1 ? look._I18N_DATA.$1001/**背包**/ : look._I18N_DATA.$1002/**码头**/ + list.plot) + '</td>' +
					'	<td>' + list.createdAt + '</td>' +
					'	<td width="140px;">' + (publicInit.authenCheck(look._AUTHEN.misSail, 98) ? '<a href="javascript:" class="a_as_button modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : 'N/A') + '</td>' +
					'</tr>' +
					'<tr class="hidden" battle_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td><input type="hidden" value="' + list.id + '" name="id">' + list.id + '</td>' +
					'	<td>' + list.typeKey + '</td>' +
					'	<td battleshiptype_type="' + list.typeKey + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
					'	<td>' + list.skillId + '</td>' +
					'	<td><select battleShipShootType_type="' + list.skillId + '" ship_id="' + list.typeKey + '" name="skillId"></select></td>' +
					'	<td>' + (list.captainId ? list.captainId : "N/A") + '</td>' +
					'	<td><input type="text" class="text" value="' + list.level + '" name="level"></td>' +
					'	<td><input type="text" class="text" value="' + list.status + '" name="status"></td>' +
					'	<td><input type="text" class="text" value="' + list.plot + '" name="plot"></td>' +
					'	<td>' + list.createdAt + '</td>' +
					'	<td width="140px;"><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			sailExtendDictionaryCallback.Check("battleshiptype", sailExtendDictionaryCallback.Assay, "list");
			sailBattleShipList.children("tr").each(function(){
				var type = "battleShipShootType",
					dic = look._SAIL_EXTEND_DIC[type],
					selectObj = $(this).find("select[" + type + "_type]"),
					skillId = selectObj.attr(type + "_type"),
					shipId = selectObj.attr("ship_id");
				for(id in dic){
					if(id == shipId){
						$.each(dic[id], function(i, list){
							selectObj.append('<option value="' + list.id + '" title="' + list.name+ '"' + (skillId == list.id ? " selected" : '') + '>' + list.name + '</option>');
						});
						return;
					}
				};
			});
			//[事件]修改信息
			$(".modify_subset").bind("click", function(){
				$(this).parents("tr").toggle().next().toggle().find("input.text:first").focus();
			});
			$(".cancel_subset").bind("click", function(){
				$(this).parents("tr").toggle().prev().toggle();
			});
			//[事件]确定修改
			$(".confirm_modify_subset").bind("click", function(){
				var inputObj = $(this).parents("tr").find("select[name], input[name]");
				var param = '';
				inputObj.each(function(){
					param += '&' + $(this).attr("name") + '=' + $.trim($(this).val());
				});
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$827/**确定修改数据？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyBattleShipRequest(param);
					}
				});
			});
			//技能适配
			var skillAssayFn = function(){
				var type = "battleShipShootType", dic = look._SAIL_EXTEND_DIC[type], element = $("*:not(select)[" + type + "_type]");
				element.each(function(){
					var obj = $(this), skillId = obj.attr("battleShipShootType_type"), shipId = obj.attr("ship_id");
					for (id in dic) {
						if (id == shipId) {
							$.each(dic[id], function(i, list){
								if (list.id == skillId) {
									obj.text(list.name);
								}
								return;
							});
							return;
						}
					};
				});
			}();
		}else{
			sailBattleShipList.append('<tr><td colspan="12">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailBattleShipList.append('<tr><td colspan="12">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 战船信息
//* 添加callback
//*************************************
var sailAddBattleShipCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
		$("#addLevelInput, #addCountInput").val("");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 战船信息
//* 修改callback
//*************************************
var sailModifyBattleShipCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$7011/**：修改成功…**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 战船零件信息
//* 获取callback
//*************************************
var sailGetBattlePartCallback = function(back){
	var cellList = $("#sailBattlePartPoperList");
	cellList.empty();
	if(back.code == 0){
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				cellList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.partId + '</td>' +
					'	<td battlepart_type="' + list.partId + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
					'	<td>' + list.num + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle(false);
			sailExtendDictionaryCallback.Check("battlepart", sailExtendDictionaryCallback.Assay, "list");
		}else{
			cellList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		cellList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 战船零件信息
//* 添加callback
//*************************************
var sailAddBattlePartCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		$("#poperAddCountInput").val("");
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetBattlePartRequest);
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 木材信息
//* 获取callback
//*************************************
var sailGetWoodsCallback = function(back){
	var listCell = $("#sailWoodsPoper");
	listCell.empty();
	if(back.code == 0){
		if (back.data) {
			listCell.html('<p><label><span class="color_gray">' + look._I18N_DATA.$791/**共有木材总数：**/ + '</span>' + back.data.num + '</label></p>');
		}else{
			listCell.append('<p>' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		}
	}else{
		listCell.append('<p>' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 木材信息
//* 添加callback
//*************************************
var sailAddWoodsCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		$("#poperAddCountInput").val("");
		sailGetWoodsRequest();
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 战斗道具信息
//* 获取callback
//*************************************
var sailGetBattleItemCallback = function(back){
	var cellList = $("#sailBattleItemList");
	cellList.empty();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (publicInit.authenCheck(look._AUTHEN.misSail, 99)) {
			$("#sailBattleItemCell").show();
			sailExtendDictionaryCallback.Check("battleitemtype", sailExtendDictionaryCallback.Assay, "select");
		}
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				var statusHtml = "", validHtml = "", idxHtml = "", statusSelect = '<select name="status">', validSelect = '<select name="validType">', idxSelect = '<select name="idx">';
				var status = list.status,
					validType = list.validType,
					idx = list.idx;
				if(status == 0){
					statusHtml = look._I18N_DATA.$1003/**未领悟**/;
					statusSelect += '<option value="0" selected>' + look._I18N_DATA.$1003/**未领悟**/ + '</option><option value="1">' + look._I18N_DATA.$1004/**已领悟**/ + '</option>';
				}else if(status == 1){
					statusHtml = look._I18N_DATA.$1004/**已领悟**/;
					statusSelect += '<option value="0">' + look._I18N_DATA.$1003/**未领悟**/ + '</option><option value="1" selected>' + look._I18N_DATA.$1004/**已领悟**/ + '</option>';
				}else{
					statusHtml = "N/A";
				}
				if(validType == 1){
					validHtml = look._I18N_DATA.$1005/**永久**/;
					validSelect += '<option value="1" selected>' + look._I18N_DATA.$1005/**永久**/ + '</option><option value="2">' + look._I18N_DATA.$1006/**临时**/ + '</option>';
				}else if(validType == 2){
					validHtml = look._I18N_DATA.$1006/**临时**/;
					validSelect += '<option value="1">' + look._I18N_DATA.$1005/**永久**/ + '</option><option value="2" selected>' + look._I18N_DATA.$1006/**临时**/ + '</option>';
				}else{
					validHtml = "N/A";
				}
				if(idx == -1){
					idxHtml = look._I18N_DATA.$1007/**未装备**/;
					idxSelect += '<option value="-1" selected>' + look._I18N_DATA.$1007/**未装备**/ + '</option><option value="0">' + look._I18N_DATA.$1008/**已装备**/ + '</option>';
				}else{
					idxHtml = look._I18N_DATA.$1008/**已装备**/;
					idxSelect += '<option value="-1">' + look._I18N_DATA.$1007/**未装备**/ + '</option><option value="0" selected>' + look._I18N_DATA.$1008/**已装备**/ + '</option>';
					
				}
				statusSelect += '</select>'; validSelect += '</select>'; idxSelect += '</select>';
				cellList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.typeKey + '</td>' +
					'	<td battleitemtype_type="' + list.typeKey + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
					'	<td>' + statusHtml + '</td>' +
					'	<td>' + idxHtml + '</td>' +
					'	<td>' + list.createdAt + '</td>' +
					'	<td>' + list.endAt + '</td>' +
					'	<td>' + validHtml + '</td>' +
					'	<td width="140px;">' + (publicInit.authenCheck(look._AUTHEN.misSail, 100) ? '<a href="javascript:" class="a_as_button modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : 'N/A') + '</td>' +
					'</tr>' +
					'<tr class="hidden" item_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td><input type="hidden" value="' + list.id + '" name="id">' + list.id + '</td>' +
					'	<td>' + list.typeKey + '</td>' +
					'	<td><select battleitemtype_type="' + list.typeKey + '" name="typeKey"></select></td>' +
					'	<td>' + statusSelect + '</td>' +
					'	<td>' + idxSelect + '</td>' +
					'	<td>' + list.createdAt + '</td>' +
					'	<td><input type="text" class="short text endat_date_input" maxlength="10" value="' + list.endAt.split(" ")[0] + '"><input type="text" class="text middleshort endat_time_input" maxlength="8" value="' + list.endAt.split(" ")[1] + '"></td>' +
					'	<td>' + validSelect + '</td>' +
					'	<td width="140px;"><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			sailExtendDictionaryCallback.Check("battleitemtype", sailExtendDictionaryCallback.Assay, "list");
			sailExtendDictionaryCallback.Check("battleitemtype", sailExtendDictionaryCallback.Assay, "select");
			contrastDatepickerGetter(".endat_date_input");
			//[事件]修改信息
			$(".modify_subset").bind("click", function(){
				$(this).parents("tr").toggle().next().toggle();
			});
			$(".cancel_subset").bind("click", function(){
				$(this).parents("tr").toggle().prev().toggle();
			});
			//[事件]确定修改
			$(".confirm_modify_subset").bind("click", function(){
				var trObj = $(this).parents("tr"), inputObj = trObj.find("select[name], input[name]");
				var endAtDate = $.trim(trObj.find(".endat_date_input").val()),
					endAtTime = $.trim(trObj.find(".endat_time_input").val()),
					reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/,
					param = '';
				if(!reg.test(endAtTime)){look.showInfo.error(look._I18N_DATA.$7035/**时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);trObj.find(".endat_time_input").focus();return false;}
				inputObj.each(function(){
					param += '&' + $(this).attr("name") + '=' + $.trim($(this).val());
				});
				param += '&endAt=' + endAtDate + " " + endAtTime;
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$827/**确定修改数据？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyBattleItemRequest(param);
					}
				});
			});
		}else{
			cellList.append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		cellList.append('<tr><td colspan="10">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 战斗道具信息
//* 添加callback
//*************************************
var sailAddBattleItemCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		$("#addCountInput").val("");
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetBattleItemRequest);
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 战斗道具信息
//* 修改callback
//*************************************
var sailModifyBattleItemCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$7011/**：修改成功…**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 货物信息
//* 获取callback
//*************************************
var sailGetGoodsCallback = function(back){
	var cellList = $("#sailGoodsList");
	cellList.empty();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (publicInit.authenCheck(look._AUTHEN.misSail, 103)) {
			$("#sailGoodsCell").show();
			sailExtendDictionaryCallback.ContentFn = function(obj, i, list){
				obj.append('<option value="' + list.goodsId + '" title="' + list.name + '">' + list.name + '</option>');
			}
			sailExtendDictionaryCallback.Check("goods", sailExtendDictionaryCallback.Assay, "select");
		}
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				cellList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td goods_type="' + list.goodsId + '">' + look._I18N_DATA.$711/**解析ing**/ + '</td>' +
					'	<td>' + list.goodsId + '</td>' +
					'	<td>' + list.number + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			sailExtendDictionaryCallback.ContentFn = function(obj, i, list){
				if(list.goodsId == obj.attr("goods_type")){
					obj.text(list.name);return;
				}
			};
			sailExtendDictionaryCallback.Check("goods", sailExtendDictionaryCallback.Assay, "list");
		}else{
			cellList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		cellList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 货物信息
//* 添加callback
//*************************************
var sailAddGoodsCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		$("#addCountInput").val("");
		sailGetGoodsRequest();
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 声望信息
//* 获取callback
//*************************************
var sailGetReputationCallback = function(back){
	var cellList = $("#sailReputationList");
	cellList.empty();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				cellList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.country + '</td>' +
					'	<td>' + list.reputation + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			cellList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		cellList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 声望信息
//* 添加callback
//*************************************
var sailAddReputationCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		$("#addCountInput").val("");
		sailGetReputationRequest();
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 任务信息
//* 获取callback
//*************************************
var sailGetTaskCallback = function(back){
	var cellList = $("#sailTaskList");
	cellList.empty();
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				cellList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.taskId + '</td>' +
					'	<td>' + list.taskState + '</td>' +
					'	<td>' + list.progress1 + '</td>' +
					'	<td>' + list.progress2 + '</td>' +
					'	<td>' + list.progress3 + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			cellList.append('<tr><td colspan="6">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		cellList.append('<tr><td colspan="6">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 任务信息
//* 添加callback
//*************************************
var sailAddTaskCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		$("#addTaskIDInput").val("");
		sailGetTaskRequest();
		look.showInfo.right(back.code + look._I18N_DATA.$557/**：添加成功…**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“军阶信息”callback
//*************************************
var sailGetBattleMarkCallback = function(back){
	var sailBattleMarkList = $("#sailBattleMarkList");
	sailBattleMarkList.children("tr").remove();
	if(back.code == 0){
		if (back.data) {
			sailBattleMarkList.append(
				'<tr><th width="160px;" class="right">' + look._I18N_DATA.$1009/**总胜场**/ + '</th><td class="left">' + back.data.totalWin + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1010/**总败场**/ + '</th><td class="left">' + back.data.totalLose + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1011/**今天连续胜场**/ + '</th><td class="left">' + back.data.todayContinuousWin + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1012/**今天连续败场**/ + '</th><td class="left">' + back.data.todayContinuousLose + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1013/**今天总胜场**/ + '</th><td class="left">' + back.data.todayWin + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1014/**今天总败场**/ + '</th><td class="left">' + back.data.todayLose + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1015/**昨天总胜场**/ + '</th><td class="left">' + back.data.yesterdayWin + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1016/**昨天总败场**/ + '</th><td class="left">' + back.data.yesterdayLose + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1017/**mark**/ + '</th><td class="left">' + back.data.mark + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1018/**军阶等级**/ + '</th><td class="left">' + back.data.level + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$919/**创建时间**/ + '</th><td class="left">' + back.data.createdAt + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$956/**更新时间**/ + '</th><td class="left">' + back.data.updatedAt + '</td></tr>' +
				'<tr><th class="right">' + look._I18N_DATA.$1019/**分数**/ + '</th><td class="left">' + back.data.score + '</td></tr>'
			);
			publicInit.tabelStyle();
		}else {
			sailBattleMarkList.append('<tr><td>' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailBattleMarkList.append('<tr><td>' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“能量数据”callback
//*************************************
var sailGetEnergyDataCallback = function(back){
	var sailEnergyDataList = $("#sailEnergyDataList");
	sailEnergyDataList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		if (back.data) {
			var disabledStyle = "";
			if(back.data.energy == 0){
				disabledStyle = " a_as_disabled";
			}
			sailEnergyDataList.append(
				'<tr uid="' + back.data.id + '">' +
				'	<td>' + back.data.energy + '</td>' +
				'	<td>' + back.data.updateTime + '</td>' +
				'	<td>' + back.data.status + '</td>' +
				'	<td><a href="javascript:" class="a_as_button a_as_disabled delete_subset' + disabledStyle + '">' + look._I18N_DATA.$638/**删除**/ + '</a></td>' +
				'</tr>'
			);
			publicInit.tabelStyle();
			//[事件]删除
			$(".delete_subset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var element = $(this).parents("tr"), uid = element.attr("uid");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$832/**确定删除该能量数据？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteEnergyDataRequest(uid);
					}
				});
			});
		}else{
			sailEnergyDataList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailEnergyDataList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 删除“能量数据”callback
//*************************************
var sailDeleteEnergyDataCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$504/**：删除能量成功…**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 排行榜管理 -> 排行榜信息
//* 获取callback
//*************************************
var sailGetRankCallback = function(back){
	var cellList = $("#sailRankManageList");
	cellList.empty();
	if(back.code == 0){
		if (back.data && back.data.length != 0) {
			$.each(back.data, function(i, list){
				cellList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.score + '</td>' +
					'	<td>' + list.name + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			cellList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		cellList.append('<tr><td colspan="4">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 排行榜管理 -> 历史最高战斗力排行榜
//* 获取callback
//*************************************
var sailGetCombatTillNowCallback = function(back){
	var listCell = $("#sailCombatTillNowPoperList");
	listCell.empty();
	if (back.code == 0) {
		if (back.data && back.data.length != 0) {
			$.each(back.data.list, function(i, list){
				listCell.append(
					'<tr>' +
					'	<td>' + (i + 1 + (back.data.page -1) * look._PAGER_SIZE * 5) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.name + '</td>' +
					'	<td>' + list.score + '</td>' +
					'	<td>' + list.time + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			setJsPager(".pager", back.data.page ? back.data.page : 1, look._PAGER_SIZE * 5, back.data.totalCount ? back.data.totalCount : look._PAGER_SIZE * 5, function(page){sailGetCombatTillNowRequest(page == 0 ? 1 : page)});
		}else{
			listCell.append('<tr><td colspan="5">' + look._I18N_DATA.$316/**没有任何数据…**/ + '</td></tr>');
		}
	}else{
		listCell.append('<tr><td colspan="5">' + look._I18N_DATA.$316/**没有任何数据…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 排行榜管理 -> 每日充值排行榜时间
//* 获得callback
//*************************************
var sailGetDayBuyRankTimeCallback = function(back){
	var listCell = $("#sailRankPoper");
	listCell.empty();
	if (back.code == 0) {
		if (back.data) {
			listCell.append(
				'<div class="form">' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span>' + back.data.start + '</label></p>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span>' + back.data.end + '</label></p>' +
				(publicInit.authenCheck(look._AUTHEN.misSail, 115) ? '<p><a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a></p>' : '') +
				'</div>' + 
				'<div class="form look_hidden"><form>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><input type="text" class="text disabled" readonly="readonly" id="poperStartDateInput" size="6" value="' + back.data.start + '" name="start" /></label></p>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span><input type="text" class="text disabled" readonly="readonly" id="poperEndDateInput" size="6" value="' + back.data.end + '" name="start" /></label></p>' +
				'	<p><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></p>' +
				'</form></div>'
			);
			datepickerGetter("#poperStartDateInput, #poperEndDateInput");
			//[事件]修改每日充值排行榜时间
			$("#sailRankPoper .modify_subset").bind("click", function(){
				$(this).parents(".form").hide().next(".form").show().find("input:first").focus();
			});
			//[事件]取消修改
			$("#sailRankPoper .cancel_subset").bind("click", function(){
				$(this).parents(".form").hide().prev(".form").show();
			});
			//[事件]确认修改
			$("#sailRankPoper .confirm_modify_subset").bind("click", function(){
				var param = $(this).parents("form").serialize();
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$808/**确定修改{word}？**/.replace(/{word}/ig, '<b class="color_yellow">' + look._I18N_DATA.$5129/**每日充值排行榜时间**/ + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyDayBuyRankTimeRequest(param);
					}
				});
			});
		}else{
			listCell.append('<p>' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		}
	}else{
		listCell.append('<p>' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 每日充值排行榜时间
//* 修改callback
//*************************************
var sailModifyDayBuyRankTimeCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$7011/**：修改成功…**/);
		$.clearPop();
		sailGetDayBuyRankTimeRequest();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 排行榜管理 -> 每日消费排行榜时间
//* 获得callback
//*************************************
var sailGetDayConsumRankTimeCallback = function(back){
	var listCell = $("#sailRankPoper");
	listCell.empty();
	if (back.code == 0) {
		if (back.data) {
			listCell.append(
				'<div class="form">' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span>' + back.data.start + '</label></p>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span>' + back.data.end + '</label></p>' +
				(publicInit.authenCheck(look._AUTHEN.misSail, 116) ? '<p><a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a></p>' : '') +
				'</div>' + 
				'<div class="form look_hidden"><form>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><input type="text" class="text disabled" readonly="readonly" id="poperStartDateInput" size="6" value="' + back.data.start + '" name="start" /></label></p>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span><input type="text" class="text disabled" readonly="readonly" id="poperEndDateInput" size="6" value="' + back.data.end + '" name="start" /></label></p>' +
				'	<p><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></p>' +
				'</form></div>'
			);
			datepickerGetter("#poperStartDateInput, #poperEndDateInput");
			//[事件]修改每日消费排行榜时间
			$("#sailRankPoper .modify_subset").bind("click", function(){
				$(this).parents(".form").hide().next(".form").show().find("input:first").focus();
			});
			//[事件]取消修改
			$("#sailRankPoper .cancel_subset").bind("click", function(){
				$(this).parents(".form").hide().prev(".form").show();
			});
			//[事件]确认修改
			$("#sailRankPoper .confirm_modify_subset").bind("click", function(){
				var param = $(this).parents("form").serialize();
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$808/**确定修改{word}？**/.replace(/{word}/ig, '<b class="color_yellow">' + look._I18N_DATA.$5130/**每日消费排行榜时间**/ + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyDayConsumRankTimeRequest(param);
					}
				});
			});
		}else{
			listCell.append('<p>' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		}
	}else{
		listCell.append('<p>' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 每日消费排行榜时间
//* 修改callback
//*************************************
var sailModifyDayConsumRankTimeCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$7011/**：修改成功…**/);
		$.clearPop();
		sailGetDayConsumRankTimeRequest();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“玩家礼包”callback
//*************************************
var sailGetUserGiftbagCallback = function(back){
	var sailUserGiftbagList = $("#sailUserGiftbagList");
	sailUserGiftbagList.children("tr:first").nextAll().remove();
	if(publicInit.authenCheck(look._AUTHEN.misSail, 33)){
		$("#addGiftBagCell").fadeIn();
		//礼包字典
		look._SAIL_GIFT_BAG_DIC_ARRAY.length == 0 ? sailGetDictionaryRequest("gift_bag", look._SAIL_USER_INFO.Get_SERVER()) : sailGiftBagDictionaryCallback.Assay();
	}
	//[事件]补偿礼包
	$("#addGiftBagSubset").unbind("click").bind("click", function(){
		var localeId = $("#localeIdSelect").val(),
			uid = $.trim($("#userIdInput").val()),
			giftBagId = $("#sailGiftBagSelect").val();
		if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
		if(uid == ""){look.showInfo.error(look._I18N_DATA.$505/**请填写要补偿礼包的玩家角色ID**/);$("#userIdInput").focus();return false;}
		if(giftBagId == ""){look.showInfo.error(look._I18N_DATA.$506/**请选择一个礼包**/);return false;}
		$.lookPop({
			type: 2,
			title: look._I18N_DATA.$66/**提醒**/,
			html:
				'<div style="width:500px;">' +
				'	<div class="pop_content_word">' +
				'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$833/**确定要给该玩家{user}补偿礼包？**/.replace(/{user}/ig, '[<b class="color_yellow">' + $("#localeIdSelect option:selected").text() + '</b>]') + '</span>' +
				'	</div>' +
				'</div>',
			confirmCallback: function(obj){
				if(obj.hasClass("a_as_disabled")){return false;}
				obj.addClass("a_as_disabled");
				sailCompensateGiftBagRequest(localeId, giftBagId, uid);
			}
		});
	});
	if(back.code == 0){
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				sailUserGiftbagList.append(
					'<tr g_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.id + '</td>' +
					'	<td>' + list.giftId + '</td>' +
					'	<td>' + list.emailId + '</td>' +
					'	<td title="' + list.description + '">' + list.name + '</td>' +
					'	<td>' + list.num + '</td>' +
					'	<td>' + (publicInit.authenCheck(look._AUTHEN.misSail, 31) ? '<a href="javascript:" class="a_as_button a_as_red delete_subset">' + look._I18N_DATA.$638/**删除**/ + '</a>' : 'N/A') + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]删除
			$(".delete_subset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var element = $(this).parents("tr"), localeId = $("#localeIdSelect").val(), userId = $.trim($("#userIdInput").val()), gid = element.attr("g_id");
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				if(userId == ""){look.showInfo.error(look._I18N_DATA.$507/**请填写要删除礼包的玩家角色ID**/);$("#userIdInput").focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$835/**确定删除该礼包？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteUserGiftbagRequest(localeId, userId, gid);
					}
				});
			});
		}else{
			sailUserGiftbagList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailUserGiftbagList.append('<tr><td colspan="7">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 删除“玩家礼包”callback
//*************************************
var sailDeleteUserGiftbagCallback = function(back){
	if(back.code == 0){
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$508/**：删除礼包成功…**/);
		initLoader.sailCommonFunction.siftSubsetEvent(sailGetUserGiftbagRequest);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 新增修改“礼包”callback
//*************************************
var sailCreateModifyGiftBagCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$509/**：成功！**/);
		$("#sailGiftBagSelect, #giftBagName, #prizeId, #emailId, #giftBagDescription").val("");
		publicInit.inputTipStyle("#sailEditorWrapper label input.text, #sailEditorWrapper label textarea", "#sailEditorWrapper .publisher_cell label tt");
		if (look._SAIL_GIFT_BAG_DIC_ARRAY.length != 0) {
			look._SAIL_GIFT_BAG_DIC_ARRAY.length = 0;
		}
		sailGetDictionaryRequest("gift_bag", look._SAIL_USER_INFO.Get_SERVER());
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var sailCreateModifyGiftBagComplete = function(textStatus){
	$("#sendGiftBagSubset, #modifyGiftBagSubset").removeClass("a_as_disabled");
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 给玩家补偿“礼包”callback
//*************************************
var sailCompensateGiftBagCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$510/**：补偿礼包成功！**/);
		$("#sailGiftBagSelect").val("");
		initLoader.sailCommonFunction.siftSubsetEvent(sailGetUserGiftbagRequest);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取补偿信息callback
//*************************************
var sailGetCompensateCallback = function(back){
	var compensationManageList = $("#compensationManageList");
	compensationManageList.empty();$("#resultCount").text("-");
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "0"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				var rangeHtml = "", typeHtml = "", emailHtml = "", disabledClass = "";
				switch (list.compensation.range){
					case 0 : rangeHtml = "部分补偿";
						break;
					case 1 : rangeHtml = "全部补偿";
						break;
					default : rangeHtml = "未知"; disabledClass = " a_as_disabled";
				}
				$.each(list.type, function(j, type){
					typeHtml += '<div class="publisher_row">' +
								'	<span class="label auto">' + look._I18N_DATA.$2060/**补偿类型：**/ + '</span><span compensation_type="' + type.type + '" class="double">' + look._I18N_DATA.$711/**解析ing**/ + '</span>' +
								'	<span class="label auto">' + look._I18N_DATA.$2061/**typekey：**/ + '</span><span class="double">' + type.typeKey + '</span>' +
								'	<span class="label auto">' + look._I18N_DATA.$93/**数量：**/ + '</span><span>' + type.count + '</span>' +
								'</div>';
				});
				$.each(list.email, function(k, email){
					emailHtml += '<div class="sail_editor_content"><div class="left look_box_corner">' + email.language + '</div><div class="right">' + email.content + '</div></div><div class="clear"></div>';
				});
				compensationManageList.prepend(
					'<div class="publisher_panel compensation_panel" c_id="' + list.compensation.id + '" c_title="' + list.compensation.name + '" c_range="' + list.compensation.range + '">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + list.compensation.name + '<tt class="right">' + rangeHtml +'</tt></div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
							emailHtml +
							typeHtml +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2018/**开始时间：**/ + list.compensation.start + '</span></a>' +
					'			</div>' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2019/**结束时间：**/ + list.compensation.end + '</span></a>' +
					'			</div>' +
					'		</div>' +
					'		<div class="subset_cell">' +
					(publicInit.authenCheck(look._AUTHEN.misSail, 76) ? '<a href="javascript:" class="a_as_button issue_compensation_subset' + disabledClass + '">' + look._I18N_DATA.$651/**发放**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
			});
			//补偿类型字典
			look._SAIL_COMPENSATION_DIC_ARRAY == undefined ? Look.prototype._SAIL_COMPENSATION_DIC_ARRAY = new Array() : null;
			look._SAIL_COMPENSATION_DIC_ARRAY.length == 0 ? sailGetDictionaryRequest("compensation", look._SAIL_USER_INFO.Get_SERVER()) : sailCompensationDictionaryCallback.Assay("list");
			//重新布局
			publicInit.resetPublisherPanel($(".compensation_panel"), compensationManageList);
			//用户id加载
			initLoader.sailCommonFunction.chooseUserOperate.init();
			initLoader.sailCommonFunction.chooseUserOperate.assy();
			//[事件]发放补偿
			$(".issue_compensation_subset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var objElement = $(this).parents(".compensation_panel"),
					compensationId = objElement.attr("c_id"),
					title = objElement.attr("c_title"),
					range = objElement.attr("c_range");
				if(range == 1){
					sailSendCompensateRequest(look._SAIL_USER_INFO.Get_SERVER(), compensationId, look._SAIL_CHOOSED_USER_ARRAY);
				}else if(range == 0){
					initLoader.sailCommonFunction.chooseUserOperate.doPop(
						look._I18N_DATA.$741/**给用户发放补偿**/ + '<span class="pop_content_description">[ ' + look._I18N_DATA.$2064/**补偿名称：**/ + '<b>' + title + '</b> ][ ' + look._I18N_DATA.$2065/**补偿ID：**/ + '<b>' + compensationId + '</b> ]</span>',
						function(){
							sailSendCompensateRequest(look._SAIL_USER_INFO.Get_SERVER(), compensationId, look._SAIL_CHOOSED_USER_ARRAY);
						}
					);
				}
			});
		}else{
			compensationManageList.html('<p class="no_result">' + look._I18N_DATA.$312/**没有补偿信息…**/ + '</p>');
		}
	}else{
		compensationManageList.html('<p class="no_result">' + look._I18N_DATA.$312/**没有补偿信息…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 新增补偿callback
//*************************************
var sailCreateCompensateCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$546/**：新增补偿成功！**/);
		$.clearPopDiv();
		sailGetCompensateCallback(back);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var sailCreateCompensateComplete = function(back){
	$("#comfirmAddCompensationSubset").removeClass("a_as_disabled");
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 给多个用户发放补偿callback
//*************************************
var sailSendCompensateCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$553/**：补偿发放成功！**/);
		$.clearPopDiv();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var sailSendCompensateComplete = function(textStatus){
	$("#popConfirmSendSubset").removeClass("a_as_disabled");
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获得玩家副官信息callback
//*************************************
var sailGetUserCaptainCallback = function(back){
	var sailUserCaptainList = $("#sailUserCaptainList");
	sailUserCaptainList.empty();$("#resultCount").text("-");
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "0"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				sailUserCaptainList.append(
					'<tr c_id="' + list.id + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.level + '</td>' +
					'	<td>' + list.skills + '</td>' +
					'	<td>' + list.exp + '</td>' +
					'	<td>' + list.type + '</td>' +
					'	<td width="140px">' + 
						(publicInit.authenCheck(look._AUTHEN.misSail, 72) ? '<a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>　' : '') + 
						(publicInit.authenCheck(look._AUTHEN.misSail, 73) ? '<a href="javascript:" class="a_as_button a_as_red delete_subset">' + look._I18N_DATA.$638/**删除**/ + '</a>' : '') + 
					'	</td>' +
					'</tr>' +
					'<tr c_id="' + list.id + '" class="look_hidden">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td><input type="text" class="text" name="level" value="' + list.level + '" /></td>' +
					'	<td><input type="text" class="text auto" name="skills" value="' + list.skills + '" /></td>' +
					'	<td>' + list.exp + '</td>' +
					'	<td prev_type="' + list.type + '"><input type="text" class="text" name="type" value="' + list.type + '" /></td>' +
					'	<td width="140px"><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]修改
			$(".modify_subset").unbind("click").bind("click", function(){
				$(this).parents("tr").hide().next("tr").show().find("input.text:first").focus();
			});
			//[事件]取消修改
			$(".cancel_subset").unbind("click").bind("click", function(){
				$(this).parents("tr").hide().prev("tr").show();
			});
			//[事件]确认修改
			$(".confirm_modify_subset").unbind("click").bind("click", function(){
				var thisElement = $(this).parents("tr").children(),
					cid =  $(this).parents("tr").attr("c_id"),
					type =  $(this).parent("td").prev().attr("prev_type"),
					params = "&level=" + thisElement.eq(1).children().val() + "&skills=" + thisElement.eq(2).children().val() + "&type=" + thisElement.eq(4).children().val();
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$851/**确定修改副官{word}？**/.replace(/{word}/ig, '<b class="color_yellow">' + type + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						sailModifyUserCaptainRequest(look._SAIL_USER_INFO.Get_SERVER(), look._SAIL_USER_INFO.Get_UID(), cid, params);
						obj.addClass("a_as_disabled");
					}
				});
			});
			//[事件]删除
			$(".delete_subset").unbind("click").bind("click", function(){
				var cid = $(this).parents("tr").attr("c_id"),
					type = $(this).parent("td").prev().text();
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$850/**确定删除副官{word}？**/.replace(/{word}/ig, '<b class="color_yellow">' + type + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteUserCaptainRequest(look._SAIL_USER_INFO.Get_SERVER(), look._SAIL_USER_INFO.Get_UID(), cid);
					}
				});
			});
		}else{
			sailUserCaptainList.append('<tr><td colspan="6">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
		//酒宴卡信息
		if(publicInit.authenCheck(look._AUTHEN.misSail, 74)){$("#viewCaptainElementCell").show();}
		//副官刷新累计积分
		if(publicInit.authenCheck(look._AUTHEN.misSail, 87)){$("#viewCaptainFreshPointCell").show();}
		//[事件]查询酒宴卡信息
		$("#viewCaptainElementSubset").unbind("click").bind("click", function(){
			var offLeft = $(this).offset().left,
				offTop = $(this).offset().top + 22;
			$.lookPopDiv({
				left: offLeft,
				top: offTop,
				contentHtml: '<div class="envelop_poper"><div class="envelop_poper_in" id="sailCaptainElementPoper"><img src="../images/small_loader.gif" /></div></div>'
			});
			sailGetUserCaptainElementRequest(look._SAIL_USER_INFO.Get_UID());
		});
		//[事件]查询副官刷新累计积分
		$("#viewCaptainFreshPointSubset").unbind("click").bind("click", function(){
			var offLeft = $(this).offset().left,
				offTop = $(this).offset().top + 22;
			$.lookPopDiv({
				left: offLeft,
				top: offTop,
				contentHtml: 
					'<div class="envelop_poper"><div style="max-height:400px;min-width:600px;overflow-y:auto;">' +
					'<table cellpadding="0" cellspacing="0" class="list">' +
					'	<thead>' +
					'		<tr>' +
					'			<th>' + look._I18N_DATA.$712/**编号**/ + '</th>' +
					'			<th>' + look._I18N_DATA.$1263/**星级积分**/ + '</th>' +
					'			<th>' + look._I18N_DATA.$1264/**副官星级**/ + '</th>' +
					'			<th>' + look._I18N_DATA.$956/**更新时间**/ + '</th>' +
					'			<th>' + look._I18N_DATA.$36/**操作**/ + '</th>' +
					'		</tr>' +
					'	</thead>' +
					'	<tbody id="sailCaptainFreshPointPoperList">' +
					'		<tr><td colspan="5"><img src="../images/small_loader.gif" /></td></tr>' +
					'	</tbody>' +
					'</table>' +
					'</div></div>'
			});
			sailGetUserCaptainFreshPointRequest(look._SAIL_USER_INFO.Get_UID());
		});
	}else{
		sailUserCaptainList.append('<tr><td colspan="6">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 新增副官callback
//*************************************
var sailCreateUserCaptainCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$548/**：新增副官成功！**/);
		$.clearPop();
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 删除副官callback
//*************************************
var sailDeleteUserCaptainCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$549/**：删除副官成功！**/);
		$.clearPop();
		sailGetUserCaptainCallback(back);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 修改副官callback
//*************************************
var sailModifyUserCaptainCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$550/**：修改副官信息成功！**/);
		$.clearPop();
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 玩家酒宴卡信息
//* 获得callback
//*************************************
var sailGetUserCaptainElementCallback = function(back){
	var listCell = $("#sailCaptainElementPoper");
	listCell.empty();
	if (back.code == 0) {
		if (back.data) {
			listCell.append(
				'<div class="form">' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2062/**酒宴卡数量：**/ + '</span>' + back.data.freshItemNum + '</label></p>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2142/**高级酒宴卡数量：**/ + '</span>' + back.data.freshAdvanceNum + '</label></p>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2063/**下次免费刷新副官的时间：**/ + '</span>' + back.data.nextFreshTime +'</label></p>' +
				(publicInit.authenCheck(look._AUTHEN.misSail, 75) ? '<p><a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a></p>' : '') +
				'</div>' + 
				'<div class="form look_hidden"><form>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2062/**酒宴卡数量：**/ + '</span><input type="text" class="text" size="4" value="' + back.data.freshItemNum + '" name="freshItemNum" /></label></p>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2142/**高级酒宴卡数量：**/ + '</span><input type="text" class="text" size="4" value="' + back.data.freshAdvanceNum + '" name="freshAdvanceNum" /></label></p>' +
				'	<p><label><span class="color_gray">' + look._I18N_DATA.$2063/**下次免费刷新副官的时间：**/ + '</span>' + back.data.nextFreshTime +'</label></p>' +
				'	<p><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></p>' +
				'</form></div>'
			);
			//[事件]修改酒宴卡
			$("#sailCaptainElementPoper .modify_subset").bind("click", function(){
				$(this).parents(".form").hide().next(".form").show().find("input:first").focus();
			});
			//[事件]取消修改
			$("#sailCaptainElementPoper .cancel_subset").bind("click", function(){
				$(this).parents(".form").hide().prev(".form").show();
			});
			//[事件]确认修改
			$("#sailCaptainElementPoper .confirm_modify_subset").bind("click", function(){
				var freshItemNum = $.trim($("*[name='freshItemNum']").val()), param = $(this).parents("form").serialize();
				if(freshItemNum == ""){look.showInfo.error(look._I18N_DATA.$552/**酒宴卡数量不能为空…**/);$("*[name='freshItemNum']").focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$852/**确定修改此用户酒宴卡信息？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyUserCaptainElementRequest(param);
					}
				});
			});
		}else{
			listCell.append('<p>' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		}
	}else{
		listCell.append('<p>' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 玩家酒宴卡信息
//* 修改callback
//*************************************
var sailModifyUserCaptainElementCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$551/**：修改酒宴卡信息成功！**/);
		$.clearPop();
		sailGetUserCaptainElementCallback(back);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 副官刷新累计积分
//* 获得callback
//*************************************
var sailGetUserCaptainFreshPointCallback = function(back){
	var listCell = $("#sailCaptainFreshPointPoperList");
	listCell.empty();
	if (back.code == 0) {
		if (back.data && back.data.length != 0) {
			$.each(back.data, function(i, list){
				listCell.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.point + '</td>' +
					'	<td>' + list.star + '</td>' +
					'	<td>' + list.updatedAt + '</td>' +
					'	<td width="100px">' + 
					(publicInit.authenCheck(look._AUTHEN.misSail, 88) ? '<a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>　' : '') + 
					'	</td>' +
					'</tr>' +
					'<tr class="look_hidden">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td><input type="text" class="text" name="point" value="' + list.point + '" /></td>' +
					'	<td><input type="hidden" class="text" name="star" value="' + list.star + '" />' + list.star + '</td>' +
					'	<td>' + list.updatedAt + '</td>' +
					'	<td width="100px"><a href="javascript:" class="a_as_button confirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a>　<a href="javascript:" class="a_as_button a_as_gray cancel_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]修改副官刷新累计积分
			$("#sailCaptainFreshPointPoperList .modify_subset").bind("click", function(){
				$(this).parents("tr").hide().next("tr").show().find("input:first").focus();
			});
			//[事件]取消修改
			$("#sailCaptainFreshPointPoperList .cancel_subset").bind("click", function(){
				$(this).parents("tr").hide().prev("tr").show();
			});
			//[事件]确认修改
			$("#sailCaptainFreshPointPoperList .confirm_modify_subset").bind("click", function(){
				var inputObj = $(this).parents("tr").find("input.text");
				var param = '';
				inputObj.each(function(){
					param += $(this).attr("name") + '=' + $.trim($(this).val()) + '&';
				});
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$824/**确定修改此用户副官刷新累计积分？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyUserCaptainFreshPointRequest(param);
					}
				});
			});
		}else{
			listCell.append('<tr><td colspan="5">' + look._I18N_DATA.$316/**没有任何数据…**/ + '</td></tr>');
		}
	}else{
		listCell.append('<tr><td colspan="5">' + look._I18N_DATA.$316/**没有任何数据…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> 副官刷新累计积分
//* 修改callback
//*************************************
var sailModifyUserCaptainFreshPointCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$7011/**：修改成功！**/);
		$.clearPop();
		sailGetUserCaptainFreshPointCallback(back);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获得普通邮件列表callback
//*************************************
var sailGetCommonEmailListCallback = function(back){
	var emailManageList = $("#emailManageList");
	emailManageList.empty();$("#resultCount").text("-");
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "0"));
		if(back.data.length != 0){
			$.each(back.data, function(i, list){
				emailManageList.prepend(
					'<div class="publisher_panel sail_editor_panel">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/ + list.type + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="sail_editor_content">' +
					'			<div class="left look_box_corner">' + look._I18N_DATA.$987/**中文**/ + '</div>' +
					'			<div class="right">' + list.cnContent.replace(/\n/g, "<br>") + '</div>' +
					'		</div>' +
					'		<div class="sail_editor_content">' +
					'			<div class="left look_box_corner">' + look._I18N_DATA.$989/**英文**/ + '</div>' +
					'			<div class="right">' + list.enContent.replace(/\n/g, "<br>") + '</div>' +
					'		</div>' +
					'		<div class="sail_editor_content">' +
					'			<div class="left look_box_corner">' + look._I18N_DATA.$1081/**韩文**/ + '</div>' +
					'			<div class="right">' + list.koContent.replace(/\n/g, "<br>") + '</div>' +
					'		</div>' +
					'		<div class="clear"></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					(publicInit.authenCheck(look._AUTHEN.misSail, 35) ? '<a href="javascript:" class="a_as_button a_as_green modify_email_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 37) ? '<a href="javascript:" class="a_as_button send_email_subset" title="' + look._I18N_DATA.$724/**给用户发送此邮件**/ + '" e_id="' + list.type + '">' + look._I18N_DATA.$613/**发送**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 36) ? '<a href="javascript:" class="a_as_button a_as_red right look_hidden delete_email_subset" e_id="' + list.type + '">' + look._I18N_DATA.$638/**删除**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' +
					'<div class="publisher_panel look_hidden">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/ + list.type + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<label for="cnContent' + list.type + '" class="publisher_label">' +
					'			<tt>' + look._I18N_DATA.$987/**中文**/ + look._I18N_DATA.$725/**（<500字符）**/ + '</tt>' +
					'			<textarea class="cn_content" id="cnContent' + list.type + '">' + list.cnContent + '</textarea>' +
					'		</label>' +
					'		<label for="enContent' + list.type + '" class="publisher_label">' +
					'			<tt>' + look._I18N_DATA.$989/**英文**/ + look._I18N_DATA.$725/**（<500字符）**/ + '</tt>' +
					'			<textarea class="en_content" id="enContent' + list.type + '">' + list.enContent + '</textarea>' +
					'		</label>' +
					'		<label for="koContent' + list.type + '" class="publisher_label">' +
					'			<tt>' + look._I18N_DATA.$1081/**韩文**/ + look._I18N_DATA.$725/**（<500字符）**/ + '</tt>' +
					'			<textarea class="ko_content" id="koContent' + list.type + '">' + list.koContent + '</textarea>' +
					'		</label>' +
					'		<div class="clear"></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_email_subset" e_id="' + list.type + '">' + look._I18N_DATA.$600/**确认**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
			});
			emailManageList.append('<div class="clear"></div>');
			initLoader.sailCommonFunction.chooseUserOperate.init();
			initLoader.sailCommonFunction.chooseUserOperate.assy();
			//[事件]修改
			$(".modify_email_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().find("textarea.cn_content").focus();
				publicInit.inputTipStyle("#emailManageList label textarea", "#emailManageList .publisher_cell label tt");
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]删除按钮显示隐藏
			$(".sail_editor_panel .bottom").bind("mouseenter", function(){
				$(this).find(".delete_email_subset").show();
			}).bind("mouseleave", function(){
				$(this).find(".delete_email_subset").hide();
			});
			//[事件]确认修改
			$(".comfirm_modify_email_subset").unbind("click").bind("click", function(){
				var emailId = $(this).attr("e_id"),
					cnContent = $.trim($("#cnContent" + emailId).val()),
					enContent = $.trim($("#enContent" + emailId).val()),
					koContent = $.trim($("#koContent" + emailId).val());
				if(!(cnContent != "" || enContent != "" || koContent != "")){look.showInfo.error(look._I18N_DATA.$511/**所有语言的邮件必须填一项…**/);$("#cnContent" + emailId).focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$836/**确定修改本条普通邮件？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						look._TEMP = emailId;
						sailCreateModifyCommonEmailRequest(look._SAIL_USER_INFO.Get_SERVER(), emailId, cnContent, enContent, koContent);
					}
				});
			});
			//[事件]删除
			$(".delete_email_subset").unbind("click").bind("click", function(){
				var emailId = $(this).attr("e_id");
				look._TEMP = emailId;
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$837/**确定删除本条普通邮件？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteCommonEmailRequest(look._SAIL_USER_INFO.Get_SERVER(), emailId);
					}
				});
			});
			//[事件]发送邮件
			$(".send_email_subset").unbind("click").bind("click", function(){
				var emailId = $(this).attr("e_id");
				initLoader.sailCommonFunction.chooseUserOperate.doPop(
					look._I18N_DATA.$738/**给用户发送邮件**/ + '<span class="pop_content_description">[ ' + look._I18N_DATA.$2043/**邮件ID：**/ + '<b>' + emailId + '</b> ]</span>',
					function(){
						sailSendCommonEmailRequest(look._SAIL_USER_INFO.Get_SERVER(), look._SAIL_CHOOSED_USER_ARRAY, emailId)
					}
				);
			});
		}else{
			emailManageList.html('<p class="no_result">' + look._I18N_DATA.$305/**没有普通邮件信息…**/ + '</p>');
		}
	}else{
		emailManageList.html('<p class="no_result">' + look._I18N_DATA.$305/**没有普通邮件信息…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 新增修改“普通邮件”callback
//*************************************
var sailCreateModifyCommonEmailCallback = function(back){
	if (back.code == 0) {
		if(look._TEMP != null){
			look.showInfo.right(back.code +  look._I18N_DATA.$513/**：修改普通邮件成功！**/);
		}else{
			look.showInfo.right(back.code + look._I18N_DATA.$514/**：新增普通邮件成功！**/);
			$("#cnContent, #enContent, #koContent").val("");
			publicInit.inputTipStyle("#addEmailEditorPanel textarea", "#addEmailEditorPanel label tt");
		}
		$.clearPop();
		look._TEMP = null;
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 删除“普通邮件”callback
//*************************************
var sailDeleteCommonEmailCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$515/**：普通邮件{email}删除成功！**/.replace(/{email}/ig, "[" + look._TEMP + "]"));
		$.clearPop();
		$(".delete_email_subset[e_id='" + look._TEMP + "']").parents(".publisher_panel").fadeOut(function(){
			$(this).remove().next(".publisher_panel").remove();
			$("#resultCount").text(parseInt($("#resultCount").text()) - 1);
			look._TEMP = null;
		});
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 给多个用户发送“普通邮件”callback
//*************************************
var sailSendCommonEmailCallback = function(back){
	if (back.code == 0) {
		$.lookPop({
			type: -1,
			title: look._I18N_DATA.$726/**发送邮件结果**/,
			closeSubset: true,
			html:
				'<div style="width:500px;">' +
				'	<div class="pop_content_word">' +
				'		<span class="pop_content_span">' + back.data + '</span>' +
				'	</div>' +
				'</div>'
		});

	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var sailSendCommonEmailComplete = function(textStatus){
	$("#popConfirmSendSubset").removeClass("a_as_disabled");
}


//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获得系统邮件列表callback
//*************************************
var sailGetSystemEmailListCallback = function(back){
	var systemEmailManageList = $("#systemEmailManageList");
	systemEmailManageList.empty();
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if(back.data.length != 0){
			$.each(back.data, function(i, list){
				systemEmailManageList.prepend(
					'<div class="publisher_panel">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/ + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="sail_editor_content">' +
					'			<div class="left look_box_corner">' + (list.locale == "" ? look._I18N_DATA.$727/**无*/ : list.locale) + '</div>' +
					'			<div class="right">' + list.content.replace(/\n/g, "<br>") + '</div>' +
					'		</div>' +
					'		<div class="clear"></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2018/**开始时间：**/ + list.startTime + '</span></a>' +
					'			</div>' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2019/**结束时间：**/ + list.endTime + '</span></a>' +
					'			</div>' +
					'		</div>' +
					'		<div class="subset_cell">' +
					(publicInit.authenCheck(look._AUTHEN.misSail, 40) ? '<a href="javascript:" class="a_as_button a_as_green modify_email_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 39) ? '<a href="javascript:" class="a_as_button a_as_red right look_hidden delete_email_subset" e_id="' + list.id + '">' + look._I18N_DATA.$638/**删除**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' +
					'<div class="publisher_panel look_hidden">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/ + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<label for="content' + list.id + '" class="publisher_label">' +
					'			<tt>' + list.locale + look._I18N_DATA.$725/**（<500字符）**/ + '</tt>' +
					'			<textarea class="email_content" id="content' + list.id + '">' + list.content + '</textarea>' +
					'		</label>' +
					'		<div class="clear"></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2048/**语言：**/ + '</span>' +
					'				<select id="languageSelect' + list.id + '"><option value="">' + look._I18N_DATA.$728/**选择**/ + '</option><option value="ZH">' + look._I18N_DATA.$987/**中文**/ + '</option><option value="EN">' + look._I18N_DATA.$989/**英文**/ + '</option><option value="KO">' + look._I18N_DATA.$1081/**韩文**/ + '</option></select>' +
					'			</div>' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2044/**时间：**/ + '</span>' +
					'				<input type="text" class="text disabled short" id="startDateInput' + list.id + '" readonly="readonly" value="' + list.startTime.substring(0, 10) + '" />' +
					'				<input type="text" class="text middleshort" id="startTimeInput' + list.id + '" value="' + list.startTime.substring(11, 19) + '" maxlength="8" />' +
					'				<span>&nbsp;&nbsp;' + look._I18N_DATA.$22/**至**/ + '&nbsp;&nbsp;</span>' +
					'				<input type="text" class="text disabled short" id="endDateInput' + list.id + '" readonly="readonly" value="' + list.endTime.substring(0, 10) + '" />' +
					'				<input type="text" class="text middleshort" id="endTimeInput' + list.id + '" value="' + list.endTime.substring(11, 19) + '" maxlength="8" />' +
					'			</div>' +
					'		</div>' +
					'		<div class="subset_cell">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_email_subset" e_id="' + list.id + '">' + look._I18N_DATA.$600/**确认**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
				datepickerGetter('#startDateInput' + list.id + ', #endDateInput' + list.id);
			});
			systemEmailManageList.append('<div class="clear"></div>');
			//[事件]修改
			$(".modify_email_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().find("textarea.email_content").focus();
				publicInit.inputTipStyle("label textarea", ".publisher_cell label tt");
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]删除按钮显示隐藏
			$(".publisher_panel .bottom").bind("mouseenter", function(){
				$(this).find(".delete_email_subset").show();
			}).bind("mouseleave", function(){
				$(this).find(".delete_email_subset").hide();
			});
			//[事件]确认修改
			$(".comfirm_modify_email_subset").unbind("click").bind("click", function(){
				var emailId = $(this).attr("e_id"),
					language = $("#languageSelect" + emailId).val(),
					emailContent = $.trim($("#content" + emailId).val()),
					startDateInput = $("#startDateInput" + emailId).val(),
					endDateInput = $("#endDateInput" + emailId).val(),
					startTimeInput = $("#startTimeInput" + emailId).val(),
					endTimeInput = $("#endTimeInput" + emailId).val(),
					reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/;
				if(language == ""){look.showInfo.error(look._I18N_DATA.$517/**请选择一个语言…**/);return false;}
				if(emailContent == ""){look.showInfo.error(look._I18N_DATA.$518/**邮件内容不能为空…**/);$("#content" + emailId).focus();return false;}
				if(startTimeInput == ""){look.showInfo.error(look._I18N_DATA.$475/**开始时间不能为空…**/);$("#startTimeInput" + emailId).focus();return false;}
				if(endTimeInput == ""){look.showInfo.error(look._I18N_DATA.$476/**结束时间不能为空…**/);$("#endTimeInput" + emailId).focus();return false;}
				if(!reg.test(startTimeInput)){look.showInfo.error(look._I18N_DATA.$477/**开始时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#startTimeInput" + emailId).focus();return false;}
				if(!reg.test(endTimeInput)){look.showInfo.error(look._I18N_DATA.$478/**结束时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#endTimeInput" + emailId).focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$838/**确定修改本条系统邮件？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						look._TEMP = emailId;
						sailModifySystemEmailRequest(look._SAIL_USER_INFO.Get_SERVER(), emailId, language, emailContent, startDateInput + " " + startTimeInput, endDateInput + " " + endTimeInput);
					}
				});

			});
			//[事件]删除
			$(".delete_email_subset").unbind("click").bind("click", function(){
				var emailId = $(this).attr("e_id");
				look._TEMP = emailId;
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$839/**确定删除本条系统邮件？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteSystemEmailRequest(look._SAIL_USER_INFO.Get_SERVER(), emailId);
					}
				});
			});
		}else{
			systemEmailManageList.html('<p class="no_result">' + look._I18N_DATA.$306/**没有系统邮件信息…**/ + '</p>');
		}
	}else{
		systemEmailManageList.html('<p class="no_result">' + look._I18N_DATA.$306/**没有系统邮件信息…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 删除“系统邮件”callback
//*************************************
var sailDeleteSystemEmailCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$519/**：系统邮件{email}刪除成功！**/.replace(/{email}/, "[" + look._TEMP + "]"));
		$(".delete_email_subset[e_id='" + look._TEMP + "']").parents(".publisher_panel").fadeOut(function(){
			$(this).remove().next(".publisher_panel").remove();
			$("#resultCount").text(parseInt($("#resultCount").text()) - 1);
			look._TEMP = null;
		});
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 修改“普通邮件”callback
//*************************************
var sailModifySystemEmailCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$520/**：修改系统邮件成功！**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 新增“普通邮件”callback
//*************************************
var sailCreateSystemEmailCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$521/**：新增系统邮件成功！**/);
		$("#cnContent, #enContent, #koContent, #startDateInput, #endDateInput, #startTimeInput, #endTimeInput").val("");
		publicInit.inputTipStyle("#addSystemEmailEditorPanel textarea", "#addSystemEmailEditorPanel label tt");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“广告激活数量”callback
//*************************************
var sailGetAdstrackerListCallback = function(back){
	var sailAdstrackerInfoList = $("#sailAdstrackerInfoList");
	sailAdstrackerInfoList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		if (back.data) {
			sailAdstrackerInfoList.append(
				'<tr>' +
				'	<td>' + back.data.activeCount + '</td>' +
				'	<td>' + back.data.inActiveCount + '</td>' +
				'	<td>' + back.data.totalCount + '</td>' +
				'</tr>'
			);
			publicInit.tabelStyle();
		}else{
			sailAdstrackerInfoList.append('<tr><td colspan="3">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailAdstrackerInfoList.append('<tr><td colspan="3">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“玩家抽奖信息”callback
//*************************************
var sailGetUserLotteryCallback = function(back){
	var sailUserLotteryList = $("#sailUserLotteryList");
	sailUserLotteryList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		if (back.data && back.data.length != 0) {
			$.each(back.data, function(i, list){
				sailUserLotteryList.append(
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.item + '</td>' +
					'	<td>' + list.time + '</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
		}else{
			sailUserLotteryList.append('<tr><td colspan="3">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailUserLotteryList.append('<tr><td colspan="3">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“活动列表”callback
//*************************************
var sailGetActivityListCallback = function(back){
	var activityManageList = $("#activityManageList");
	activityManageList.empty();
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if(back.data.length != 0){
			var countryHtml, localHtml, newUserHtml, isBuyBucksHtml;
			$.each(back.data, function(i, list){
				switch(list.countryCode){
					case "all" : countryHtml = look._I18N_DATA.$15/**全部**/;break;
					default : countryHtml = (list.countryCode != "" ? list.countryCode : "N/A");
				}
				switch(list.local){
					case "all" : localHtml = look._I18N_DATA.$15/**全部**/;break;
					case "zh" : localHtml = look._I18N_DATA.$987/**中文**/;break;
					case "en" : localHtml = look._I18N_DATA.$989/**英文**/;break;
					default : localHtml = (list.local != "" ? list.local : "N/A");
				}
				switch(list.newUser){
					case 0 : newUserHtml = look._I18N_DATA.$730/**否**/;break;
					case 1 : newUserHtml = look._I18N_DATA.$729/**是**/;break;
					default : newUserHtml = (list.newUser != "" ? list.newUser : "N/A");
				}
				switch(list.isBuyBucks){
					case 0 : isBuyBucksHtml = look._I18N_DATA.$731/**所有玩家**/;break;
					case 1 : isBuyBucksHtml = look._I18N_DATA.$729/**是**/;break;
					default : isBuyBucksHtml = (list.isBuyBucks != "" ? list.isBuyBucks : "N/A");
				}
				activityManageList.prepend(
					'<div class="publisher_panel add_activity_editor_panel" a_id="' + list.id + '">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/ + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><span>' + look.dateFormat(new Date(parseInt(list.startTime)), "yyyy-MM-dd hh:mm:ss") + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span><span>' + look.dateFormat(new Date(parseInt(list.endTime)), "yyyy-MM-dd hh:mm:ss") + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2020/**移除时间：**/ + '</span><span>' + look.dateFormat(new Date(parseInt(list.removeTime)), "yyyy-MM-dd hh:mm:ss") + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2024/**国家：**/ + '</span><span class="double">' + countryHtml + '</span><span class="label">' + look._I18N_DATA.$2/**语言：**/ + '</span><span class="double" local="' + list.local + '">' + localHtml + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2025/**最小等级：**/ + '</span><span class="double">' + list.minLv + '</span><span class="label">' + look._I18N_DATA.$2026/**最大等级：**/ + '</span><span class="double">' + list.maxLv + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2027/**新用户：**/ + '</span><span class="double">' + newUserHtml + '</span><span class="label">' + look._I18N_DATA.$2028/**充值玩家：**/ + '</span><span class="double">' + isBuyBucksHtml + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2029/**前置任务：**/ + '</span><span class="double">' + list.preActId + '</span><span class="label">' + look._I18N_DATA.$2030/**后置任务：**/ + '</span><span class="double">' + list.postActId + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2031/**每天次数：**/ + '</span><span class="double">' + list.dailyCount + '</span><span class="label">' + look._I18N_DATA.$2032/**总次数：**/ + '</span><span class="double">' + list.totalCount + '</span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1021/**任务**/ + '1]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long" task_type="' + list.taskType1 + '">' + look._I18N_DATA.$711/**解析ing**/ + '</span><span class="label short">ID：</span><span class="normal">' + list.taskId1 + '</span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal">' + list.taskNum1 + '</span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1021/**任务**/ + '2]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long" task_type="' + list.taskType2 + '">' + look._I18N_DATA.$711/**解析ing**/ + '</span><span class="label short">ID：</span><span class="normal">' + list.taskId2 + '</span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal">' + list.taskNum2 + '</span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1021/**任务**/ + '3]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long" task_type="' + list.taskType3 + '">' + look._I18N_DATA.$711/**解析ing**/ + '</span><span class="label short">ID：</span><span class="normal">' + list.taskId3 + '</span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal">' + list.taskNum3 + '</span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1022/**奖励**/ + '1]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long" reward_type="' + list.rewardType1 + '">' + look._I18N_DATA.$711/**解析ing**/ + '</span><span class="label short">ID：</span><span class="normal">' + list.rewardId1 + '</span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal">' + list.rewardNum1 + '</span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1022/**奖励**/ + '2]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long" reward_type="' + list.rewardType2 + '">' + look._I18N_DATA.$711/**解析ing**/ + '</span><span class="label short">ID：</span><span class="normal">' + list.rewardId2 + '</span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal">' + list.rewardNum2 + '</span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1022/**奖励**/ + '3]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long" reward_type="' + list.rewardType3 + '">' + look._I18N_DATA.$711/**解析ing**/ + '</span><span class="label short">ID：</span><span class="normal">' + list.rewardId3 + '</span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal">' + list.rewardNum3 + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2033/**最小军阶等级：**/ + '</span><span class="double">' + list.minMarkLv + '</span><span class="label">' + look._I18N_DATA.$2034/**最大军阶等级：**/ + '</span><span class="double">' + list.maxMarkLv + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2035/**英文名：**/ + '</span><span title="' + list.activityNameEn + '">' + look.getByteVal(list.activityNameEn, 58) + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2036/**英文描述：**/ + '</span><span title="' + list.activityDescrEn + '">' + look.getByteVal(list.activityDescrEn, 58) + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2037/**简体名：**/ + '</span><span title="' + list.activityNameZhHans + '">' + look.getByteVal(list.activityNameZhHans, 56) + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2038/**简体描述：**/ + '</span><span title="' + list.activityDescrZhHans + '">' + look.getByteVal(list.activityDescrZhHans, 56) + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2039/**繁体名：**/ + '</span><span title="' + list.activityNameZhHant + '">' + look.getByteVal(list.activityNameZhHant, 56) + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2040/**繁体描述：**/ + '</span><span title="' + list.activityDescrZhHant + '">' + look.getByteVal(list.activityDescrZhHant, 56) + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2041/**韩语名：**/ + '</span><span title="' + list.activityNameKo + '">' + look.getByteVal(list.activityNameKo, 58) + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2042/**韩语描述：**/ + '</span><span title="' + list.activityDescrKo + '">' + look.getByteVal(list.activityDescrKo, 58) + '</span></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2049/**选择服务器：**/ + '</span>' +
					'				<select server_type="">' +
					'					<option value="">' + look._I18N_DATA.$24/**请选择**/ + '</option>' +
					'				</select>' +
					'			</div>' +
					'		</div>' +
					'		<div class="subset_cell">' +
					(publicInit.authenCheck(look._AUTHEN.misSail, 48) ? '<a href="javascript:" class="a_as_button a_as_green modify_activity_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 58) ? '<a href="javascript:" class="a_as_button deploy_activity_subset">' + look._I18N_DATA.$622/**发布**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 49) ? '<a href="javascript:" class="a_as_button a_as_red right look_hidden delete_activity_subset" a_id="' + list.id + '">' + look._I18N_DATA.$638/**删除**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' +
					'<div class="publisher_panel look_hidden add_activity_editor_panel" a_id="' + list.id + '">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/ + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<form id="modifyActivtiyForm' + list.id + '">' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><span><input type="text" class="text disabled normal" id="startDateInput' + list.id + '" readonly="readonly" value="' + look.dateFormat(new Date(parseInt(list.startTime)), "yyyy-MM-dd") + '" /><input type="text" class="text short" id="startTimeInput' + list.id + '" value="' + look.dateFormat(new Date(parseInt(list.startTime)), "hh:mm:ss") + '" maxlength="8" /></span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span><span><input type="text" class="text disabled normal" id="endDateInput' + list.id + '" readonly="readonly" value="' + look.dateFormat(new Date(parseInt(list.endTime)), "yyyy-MM-dd") + '" /><input type="text" class="text short" id="endTimeInput' + list.id + '" value="' + look.dateFormat(new Date(parseInt(list.endTime)), "hh:mm:ss") + '" maxlength="8" /></span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2020/**移除时间：**/ + '</span><span><input type="text" class="text disabled normal" id="removeDateInput' + list.id + '" readonly="readonly" value="' + look.dateFormat(new Date(parseInt(list.removeTime)), "yyyy-MM-dd") + '" /><input type="text" class="text short" id="removeTimeInput' + list.id + '" value="' + look.dateFormat(new Date(parseInt(list.removeTime)), "hh:mm:ss") + '" maxlength="8" /></span></div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2024/**国家：**/ + '</span><span class="double"><select name="countryCode" sv="' + list.countryCode + '"><option value="all">' + look._I18N_DATA.$15/**全部**/ + '</option></select></span>' +
					'			<span class="label">' + look._I18N_DATA.$2/**语言：**/ + '</span><span class="double"><select name="local" sv="' + list.local + '"><option value="all">' + look._I18N_DATA.$15/**全部**/ + '</option><option value="zh">' + look._I18N_DATA.$987/**中文**/ + '</option><option value="en">' + look._I18N_DATA.$989/**英文**/ + '</option></select></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2025/**最小等级：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="minLv" value="' + list.minLv + '" /></span>' +
					'			<span class="label">' + look._I18N_DATA.$2026/**最大等级：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="maxLv" value="' + list.maxLv + '" /></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2027/**新用户：**/ + '</span><span class="double"><select name="newUser" sv="' + list.newUser + '"><option value="1">' + look._I18N_DATA.$729/**是**/ + '</option><option value="0">' + look._I18N_DATA.$730/**否**/ + '</option></select></span>' +
					'			<span class="label">' + look._I18N_DATA.$2028/**充值玩家：**/ + '</span><span class="double"><select name="isBuyBucks" sv="' + list.isBuyBucks + '"><option value="0">' + look._I18N_DATA.$731/**所有玩家**/ + '</option><option value="1">' + look._I18N_DATA.$729/**是**/ + '</option></select></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2029/**前置任务：**/ + '</span><span class="double"><input type="text" class="text short" name="preActId" value="' + list.preActId + '" /></span>' +
					'			<span class="label">' + look._I18N_DATA.$2030/**后置任务：**/ + '</span><span class="double"><input type="text" class="text short" name="postActId" value="' + list.postActId + '" /></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2031/**每天次数：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="dailyCount" value="' + list.dailyCount + '" /></span>' +
					'			<span class="label">' + look._I18N_DATA.$2032/**总次数：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="totalCount" value="' + list.totalCount + '" /></span>' +
					'		</div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1021/**任务**/ + '1]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long"><select name="taskType1" id="taskType1" task_type="' + list.taskType1 + '" class="long"></select></span><span class="label short">ID：</span><span class="normal"><input type="text" class="text middleshort" name="taskId1" value="' + list.taskId1 + '" /></span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal"><input type="text" class="text middleshort" name="taskNum1" value="' + list.taskNum1 + '" /></span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1021/**任务**/ + '2]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long"><select name="taskType2" id="taskType2" task_type="' + list.taskType2 + '" class="long"></select></span><span class="label short">ID：</span><span class="normal"><input type="text" class="text middleshort" name="taskId2" value="' + list.taskId2 + '" /></span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal"><input type="text" class="text middleshort" name="taskNum2" value="' + list.taskNum2 + '" /></span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1021/**任务**/ + '3]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long"><select name="taskType3" id="taskType3" task_type="' + list.taskType3 + '" class="long"></select></span><span class="label short">ID：</span><span class="normal"><input type="text" class="text middleshort" name="taskId3" value="' + list.taskId3 + '" /></span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal"><input type="text" class="text middleshort" name="taskNum3" value="' + list.taskNum3 + '" /></span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1022/**奖励**/ + '1]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long"><select name="rewardType1" id="rewardType1" reward_type="' + list.rewardType1 + '" class="long"></select></span><span class="label short">ID：</span><span class="normal"><input type="text" class="text middleshort" name="rewardId1" value="' + list.rewardId1 + '" /></span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal"><input type="text" class="text middleshort" name="rewardNum1" value="' + list.rewardNum1 + '" /></span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1022/**奖励**/ + '2]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long"><select name="rewardType2" id="rewardType2" reward_type="' + list.rewardType2 + '" class="long"></select></span><span class="label short">ID：</span><span class="normal"><input type="text" class="text middleshort" name="rewardId2" value="' + list.rewardId2 + '" /></span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal"><input type="text" class="text middleshort" name="rewardNum2" value="' + list.rewardNum2 + '" /></span></div>' +
					'		<div class="publisher_row"><span class="label">[' + look._I18N_DATA.$1022/**奖励**/ + '3]' + look._I18N_DATA.$11/**类型：**/ + '</span><span class="long"><select name="rewardType3" id="rewardType3" reward_type="' + list.rewardType3 + '" class="long"></select></span><span class="label short">ID：</span><span class="normal"><input type="text" class="text middleshort" name="rewardId3" value="' + list.rewardId3 + '" /></span><span class="label short">' + look._I18N_DATA.$93/**数量：**/ + '</span><span class="normal"><input type="text" class="text middleshort" name="rewardNum3" value="' + list.rewardNum3 + '" /></span></div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2033/**最小军阶等级：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="minMarkLv" value="' + list.minMarkLv + '" /></span>' +
					'			<span class="label">' + look._I18N_DATA.$2034/**最大军阶等级：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="maxMarkLv" value="' + list.maxMarkLv + '" /></span>' +
					'		</div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2035/**英文名：**/ + '</span><input type="text" class="text auto" name="activityNameEn" value="' + list.activityNameEn + '"></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2036/**英文描述：**/ + '</span><textarea class="auto" name="activityDescrEn">' + list.activityDescrEn + '</textarea></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2037/**简体名：**/ + '</span><input type="text" class="text auto" name="activityNameZhHans" value="' + list.activityNameZhHans + '"></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2038/**简体描述：**/ + '</span><textarea class="auto" name="activityDescrZhHans">' + list.activityDescrZhHans + '</textarea></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2039/**繁体名：**/ + '</span><input type="text" class="text auto" name="activityNameZhHant" value="' + list.activityNameZhHant + '"></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2040/**繁体描述：**/ + '</span><textarea class="auto" name="activityDescrZhHant">' + list.activityDescrZhHant + '</textarea></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2041/**韩语名：**/ + '</span><input type="text" class="text auto" name="activityNameKo" value="' + list.activityNameKo + '"></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2042/**韩语描述：**/ + '</span><textarea class="auto" name="activityDescrKo">' + list.activityDescrKo + '</textarea></div>' +
					'		</form>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2049/**选择服务器：**/ + '</span>' +
					'				<select disabled="true">' +
					'					<option value="">' + look._I18N_DATA.$24/**请选择**/ + '</option>' +
					'				</select>' +
					'			</div>' +
					'		</div>' +
					'		<div class="subset_cell">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_activity_subset" a_id="' + list.id + '">' + look._I18N_DATA.$600/**确认**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
				datepickerGetter('#startDateInput' + list.id + ', #endDateInput' + list.id, null);
				contrastDatepickerGetter('#removeDateInput' + list.id, null);
			});
			activityManageList.append('<div class="clear"></div>');
			//字典请求
			if(!look._SAIL_TASK_DIC_ARRAY){sailGetDictionaryRequest("task");}else{sailTaskDictionaryCallback.Assay("list");sailTaskDictionaryCallback.Assay("select");}
			if(!look._SAIL_REWARD_DIC_ARRAY){sailGetDictionaryRequest("reward");}else{sailRewardDictionaryCallback.Assay("list");sailRewardDictionaryCallback.Assay("select");}
			if(!look._SAIL_SERVER_DIC_ARRAY){sailGetDictionaryRequest("server");}else{sailServerDictionaryCallback.Assay("select");}
			
			//[事件]修改
			$(".modify_activity_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().focus();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]删除按钮显示隐藏
			$(".publisher_panel .bottom").bind("mouseenter", function(){
				$(this).find(".delete_activity_subset").show();
			}).bind("mouseleave", function(){
				$(this).find(".delete_activity_subset").hide();
			});
			//[事件]删除
			$(".delete_activity_subset").unbind("click").bind("click", function(){
				var activityId = $(this).attr("a_id");
				look._TEMP = activityId;
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$840/**确定删除活动{activity}？**/.replace(/{activity}/ig, '<b class="color_yellow">' + activityId +'</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteActivityRequest(look._SAIL_USER_INFO.Get_SERVER(), activityId);
					}
				});

			});
			//[事件]确认修改
			$(".comfirm_modify_activity_subset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val(),
					element = $(this).parents(".publisher_panel"),
					activityId = element.attr("a_id"),
					startDate = $.trim($("#startDateInput" + activityId).val()),
					endDate = $.trim($("#endDateInput" + activityId).val()),
					removeDate = $.trim($("#removeDateInput" + activityId).val()),
					startTime = $.trim($("#startTimeInput" + activityId).val()),
					endTime = $.trim($("#endTimeInput" + activityId).val()),
					removeTime = $.trim($("#removeTimeInput" + activityId).val()),
					startDateTime = new Date(Date.parse((startDate + " " + startTime).replace(/\-/g,"/"))).getTime(),
					endDateTime = new Date(Date.parse((endDate + " " + endTime).replace(/\-/g,"/"))).getTime(),
					removeDateTime = new Date(Date.parse((removeDate + " " + removeTime).replace(/\-/g,"/"))).getTime(),
					reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/,
					verifyFlag = true;
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				$(element).find(".publisher_row").find("select,input").each(function(){
					if($.trim($(this).val()) == ""){verifyFlag = false;$(this).focus();return false;}
				});
				if(!verifyFlag){look.showInfo.error(look._I18N_DATA.$481/**所有选项都不能为空…**/);return false;}
				if(!reg.test(startTime)){look.showInfo.error(look._I18N_DATA.$477/**开始时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#startTimeInput").focus();return false;}
				if(!reg.test(endTime)){look.showInfo.error(look._I18N_DATA.$478/**结束时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#endTimeInput").focus();return false;}
				if(!reg.test(removeTime)){look.showInfo.error(look._I18N_DATA.$479/**移除时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#removeTimeInput").focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$842/**确定修改活动{activity}？**/.replace(/{activity}/ig, '<b class="color_yellow">' + activityId +'</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyActivityRequest(localeId, activityId, '&startTime=' + startDateTime + '&endTime=' + endDateTime + '&removeTime=' + removeDateTime + '&' +$("#modifyActivtiyForm" + activityId).serialize());
					}
				});
			});
			//[事件]发布
			$(".deploy_activity_subset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val(),
					element = $(this).parents(".publisher_panel"),
					serverId = element.find(".bottom_cell").children("select").val(),
					activityId = element.attr("a_id");
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				if(serverId == ""){look.showInfo.error(look._I18N_DATA.$529/**请选择服务器…**/);return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$843/**确定发布活动{activity}？**/.replace(/{activity}/ig, '<b class="color_yellow">' + activityId +'</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeployActivityRequest(localeId, serverId, activityId);
					}
				});
			});
		}else{
			activityManageList.html('<p class="no_result">' + look._I18N_DATA.$307/**没有活动信息…**/ + '</p>');
		}
	}else{
		activityManageList.html('<p class="no_result">' + look._I18N_DATA.$307/**没有活动信息…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 删除“活动”callback
//*************************************
var sailDeleteActivityCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$527/**：活动{activity}删除成功！**/.replace(/{activity}/ig, "[" + look._TEMP + "]"));
		$(".delete_activity_subset[a_id='" + look._TEMP + "']").parents(".publisher_panel").fadeOut(function(){
			$(this).remove().next(".publisher_panel").remove();
			$("#resultCount").text(parseInt($("#resultCount").text()) - 1);
			look._TEMP = null;
		});
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 新增“活动”callback
//*************************************
var sailAddActivityCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$525/**：新增活动成功！**/);
		$.clearPop();
		$(".add_activity_poper").fadeOut(function(){$(this).remove()});
		sailGetActivityListRequest($("#localeIdSelect").val());
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 修改“活动”callback
//*************************************
var sailModifyActivityCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$526/**：修改活动成功！**/);
		$.clearPop();
		sailGetActivityListRequest($("#localeIdSelect").val());
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 发布“活动”callback
//*************************************
var sailDeployActivityCallback = function(back){
	if (back.code == 0) {
		look.showInfo.right(back.code + look._I18N_DATA.$530/**：活动发布成功！**/);
		$.clearPop();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“公告列表”callback
//*************************************
var sailGetNoticeListCallback = function(back){
	var noticeManageList = $("#noticeManageList");
	noticeManageList.empty();
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if(back.data.length != 0){
			var countryHtml, picHtml, picUrl = "";
			$.each(back.data, function(i, list){
				if (list.picAll != "") {
					picHtml = "";
					$.each(list.picAll.split(","), function(j){
						picUrl = list.picAll.split(",")[j];
						picHtml += '<a href="' + picUrl + '" title="' + picUrl.split("?")[1] + '" target="_blank" class="blue">[' + (j + 1) + ']</a>';
					});
				}else{
					picHtml = "N/A";
				}
				noticeManageList.prepend(
					'<div class="publisher_panel add_notice_editor_panel" n_id="' + list.id + '">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/  + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><span>' + look.dateFormat(new Date(parseInt(list.startDate)), "yyyy-MM-dd hh:mm:ss") + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2020/**移除时间：**/ + '</span><span>' + look.dateFormat(new Date(parseInt(list.removeDate)), "yyyy-MM-dd hh:mm:ss") + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2021/**跳转类型：**/ + '</span><span goto_type="' + list.gotoType + '">' + look._I18N_DATA.$711/**解析ing**/ + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2022/**跳转ID：**/ + '</span><span>' + list.gotoId + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2023/**链接：**/ + '</span><span><a href="javascript:" class="url_subset" title="' + list.url + '">' + look.getByteVal(list.url, 32) + '</a></span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2047/**图片：**/ + '</span><span class="double notice_pic_cell">' + picHtml + '</span><a href="javascript:" class="a_as_button a_as_gray upload_subset">' + look._I18N_DATA.$647/**打开上传插件**/ + '</a></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2049/**选择服务器：**/ + '</span>' +
					'				<select server_type="">' +
					'					<option value="">' + look._I18N_DATA.$24/**请选择**/ + '</option>' +
					'				</select>' +
					'			</div>' +
					'		</div>' +
					'		<div class="subset_cell">' +
					(publicInit.authenCheck(look._AUTHEN.misSail, 55) ? '<a href="javascript:" class="a_as_button a_as_green modify_notice_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 59) ? '<a href="javascript:" class="a_as_button deploy_notice_subset">' + look._I18N_DATA.$622/**发布**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 56) ? '<a href="javascript:" class="a_as_button a_as_red right look_hidden delete_notice_subset" a_id="' + list.id + '">' + look._I18N_DATA.$638/**删除**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' +
					'<div class="publisher_panel look_hidden add_notice_editor_panel" n_id="' + list.id + '">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/  + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<form id="modifyNoticeForm' + list.id + '">' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><span><input type="text" class="text disabled normal" id="startDateInput' + list.id + '" readonly="readonly" value="' + look.dateFormat(new Date(parseInt(list.startDate)), "yyyy-MM-dd") + '" /><input type="text" class="text short" id="startTimeInput' + list.id + '" value="' + look.dateFormat(new Date(parseInt(list.startDate)), "hh:mm:ss") + '" maxlength="8" /></span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2020/**移除时间：**/ + '</span><span><input type="text" class="text disabled normal" id="removeDateInput' + list.id + '" readonly="readonly" value="' + look.dateFormat(new Date(parseInt(list.removeDate)), "yyyy-MM-dd") + '" /><input type="text" class="text short" id="removeTimeInput' + list.id + '" value="' + look.dateFormat(new Date(parseInt(list.removeDate)), "hh:mm:ss") + '" maxlength="8" /></span></div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2021/**跳转类型：**/ + '</span>' +
					'			<span class="auto"><select name="gotoType" class="auto" goto_type="' + list.gotoType + '"></select></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2022/**跳转ID：**/ + '</span><span class="auto"><input type="text" class="text auto" name="gotoId" value="' + list.gotoId + '" /></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2023/**链接：**/ + '</span><span class="auto"><input type="text" class="text auto" name="url" value="' + list.url + '" /></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2047/**图片：**/ + '</span><span class="double notice_pic_cell">' + picHtml + '</span>' +
					'		</div>' +
					'		</form>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell">' +
					'				<span>' + look._I18N_DATA.$2049/**选择服务器：**/ + '</span>' +
					'				<select disabled="true">' +
					'					<option value="">' + look._I18N_DATA.$24/**请选择**/ + '</option>' +
					'				</select>' +
					'			</div>' +
					'		</div>' +
					'		<div class="subset_cell">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_notice_subset" a_id="' + list.id + '">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
				datepickerGetter('#startDateInput' + list.id + ', #removeDateInput' + list.id, null);
			});
			noticeManageList.append('<div class="clear"></div>');
			//字典请求
			if(!look._SAIL_GOTO_DIC_ARRAY){sailGetDictionaryRequest("goto");}else{sailGotoDictionaryCallback.Assay("list");sailGotoDictionaryCallback.Assay("select");}
			if(!look._SAIL_SERVER_DIC_ARRAY){sailGetDictionaryRequest("server");}else{sailServerDictionaryCallback.Assay("select");}
			
			//[事件]修改
			$(".modify_notice_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().focus();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
				$(".sail_uploadify_poper").remove();
			});
			//[事件]删除按钮显示隐藏
			$(".publisher_panel .bottom").bind("mouseenter", function(){
				$(this).find(".delete_notice_subset").show();
			}).bind("mouseleave", function(){
				$(this).find(".delete_notice_subset").hide();
			});
			//[事件]删除
			$(".delete_notice_subset").unbind("click").bind("click", function(){
				var noticeId = $(this).attr("a_id");
				look._TEMP = noticeId;
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$865/**确定删除公告{notice}？**/.replace(/{notice}/ig, '<b class="color_yellow">' + noticeId +'</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteNoticeRequest(look._SAIL_USER_INFO.Get_SERVER(), noticeId);
					}
				});

			});
			//[事件]确认修改
			$(".comfirm_modify_notice_subset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val(),
					element = $(this).parents(".publisher_panel"),
					noticeId = element.attr("n_id");
					startDate = $.trim($("#startDateInput" + noticeId).val()),
					removeDate = $.trim($("#removeDateInput" + noticeId).val()),
					startTime = $.trim($("#startTimeInput" + noticeId).val()),
					removeTime = $.trim($("#removeTimeInput" + noticeId).val()),
					startDateTime = new Date(Date.parse((startDate + " " + startTime).replace(/\-/g,"/"))).getTime(),
					removeDateTime = new Date(Date.parse((removeDate + " " + removeTime).replace(/\-/g,"/"))).getTime(),
					reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/,
					verifyFlag = true;
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				$(element).find(".publisher_row").find("select,input").each(function(){
					if($.trim($(this).val()) == ""){verifyFlag = false;$(this).focus();return false;}
				});
				if(!verifyFlag){look.showInfo.error(look._I18N_DATA.$481/**所有选项都不能为空…**/);return false;}
				if(!reg.test(startTime)){look.showInfo.error(look._I18N_DATA.$477/**开始时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#startTimeInput").focus();return false;}
				if(!reg.test(removeTime)){look.showInfo.error(look._I18N_DATA.$479/**移除时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#removeTimeInput").focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$841/**确定修改公告{notice}？**/.replace(/{notice}/ig, '<b class="color_yellow">' + noticeId + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyNoticeRequest(localeId, noticeId, '&startDate=' + startDateTime + '&removeDate=' + removeDateTime + '&' +$("#modifyNoticeForm" + noticeId).serialize());
					}
				});
			});
			//[事件]查看链接地址
			$(".url_subset").unbind("click").bind("click", function(event){
				$.lookPop({
					type: -1,
					title: look._I18N_DATA.$732/**完整链接**/,
					closeSubset: true,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span">' + $(this).attr("title") + '</span>' +
						'	</div>' +
						'</div>'
				});
				look.selectContents(".pop_content_span");
				$(".pop_content_span").bind("click", function(){look.selectContents($(this));});
			});
			//[事件]上传图片
			$(".upload_subset").unbind("click").bind("click", function(){
				if(look._SAIL_USER_INFO.Get_SERVER() == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				look._TEMP = $(this).parents(".publisher_panel").attr("n_id");
				var noticePicCell = noticeManageList.children(".publisher_panel[n_id=" + look._TEMP + "]").find(".notice_pic_cell"),
					picNum = 0, container = $(this).parents(".publisher_panel");
				$.get('public/uploadify_poper.html', function(text){
					$.lookPopDiv({
						container: container,
						left: 2,
						top: 2,
						addClass: "sail_uploadify_poper look_box_corner",
						contentHtml: text,
						remover: ".sail_uploadify_poper"
					});
					initLoader.picUploadFunction(look._IM10119.url, look._IM10119.getJson(look._SAIL_USER_INFO.Get_SERVER(), look._TEMP),
					function(){
						noticePicCell.text('');
					}, function(response){
						if(response.data && response.code == 0){
							noticePicCell.append('<a href="' + response.data.url + '" title="' + response.data.name + '" target="_blank" class="blue">[' + ++picNum + ']</a>');
						}
					}, function(allCompleteData){
						if(allCompleteData.errors == 0){$(".sail_uploadify_poper").remove();}
					});
				});
			});
			//[事件]发布
			$(".deploy_notice_subset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val(),
					element = $(this).parents(".publisher_panel"),
					serverId = element.find(".bottom_cell").children("select").val(),
					noticeId = element.attr("n_id");
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				if(serverId == ""){look.showInfo.error(look._I18N_DATA.$529/**请选择服务器…**/);return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$844/**确定发布公告{notice}？**/.replace(/{notice}/ig, '<b class="color_yellow">' + noticeId + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeployNoticeRequest(localeId, serverId, noticeId);
					}
				});

			});
		}else{
			noticeManageList.html('<p class="no_result">' + look._I18N_DATA.$308/**没有公告信息…**/ + '</p>');
		}
	}else{
		noticeManageList.html('<p class="no_result">' + look._I18N_DATA.$308/**没有公告信息…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 删除“公告”callback
//*************************************
var sailDeleteNoticeCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$524/**：公告{notice}删除成功！**/.replace(/{notice}/ig, "[" + look._TEMP + "]"));
		$(".delete_notice_subset[a_id='" + look._TEMP + "']").parents(".publisher_panel").fadeOut(function(){
			$(this).remove().next(".publisher_panel").remove();
			$("#resultCount").text(parseInt($("#resultCount").text()) - 1);
			look._TEMP = null;
		});
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 新增“公告”callback
//*************************************
var sailAddNoticeCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$522/**：新增公告成功！**/);
		$(".add_notice_poper").fadeOut(function(){$(this).remove()});
		sailGetNoticeListRequest($("#localeIdSelect").val());
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 修改“公告”callback
//*************************************
var sailModifyNoticeCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$523/**：修改公告成功！**/);
		sailGetNoticeListRequest($("#localeIdSelect").val());
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 发布“公告”callback
//*************************************
var sailDeployNoticeCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$531/**：公告发布成功！**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 获取“打折信息列表”callback
//*************************************
var sailGetOnsaleListCallback = function(back){
	var onsaleManageList = $("#onsaleManageList");
	onsaleManageList.empty();
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if(back.data.length != 0){
			var typeHtml = "";
			$.each(back.data, function(i, list){
				switch(list.type){
					case "ship_type": typeHtml = look._I18N_DATA.$1082/**船**/;break;
					case "battleship_type": typeHtml = look._I18N_DATA.$1083/**战船**/;break;
					case "building_type": typeHtml = look._I18N_DATA.$1084/**建筑**/;break;
					case "scene_type": typeHtml = look._I18N_DATA.$1085/**地块**/ + "/" + look._I18N_DATA.$1086/**船位**/;break;
					case "battle_items_type": typeHtml = look._I18N_DATA.$1087/**道具**/;break;
					case "bucks_items": typeHtml = look._I18N_DATA.$1088/**金币**/ + "/" + look._I18N_DATA.$1055/**能量**/;break;
					case "storage_level": typeHtml = look._I18N_DATA.$1089/**仓库**/;break;
					default : typeHtml = look._I18N_DATA.$10/**未知**/;break;
				}
				onsaleManageList.prepend(
					'<div class="publisher_panel onsale_editor_panel" s_id="' + list.id + '">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/  + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><span>' + look.dateFormat(new Date(parseInt(list.startTime)), "yyyy-MM-dd hh:mm:ss") + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span><span>' + look.dateFormat(new Date(parseInt(list.endTime)), "yyyy-MM-dd hh:mm:ss") + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2051/**有效期：**/ + '</span><span>' + list.days + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2057/**商品名称：**/ + '</span><span>' + list.goodsName + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2052/**类别：**/ + '</span><span>' + typeHtml + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2053/**类别ID：**/ + '</span><span>' + list.typeId + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2054/**购买类型：**/ + '</span><span>' + list.buyType + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2055/**原价：**/ + '</span><span>' + list.costPrice + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2056/**打折价：**/ + '</span><span>' + list.discountPrice + '</span></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					(publicInit.authenCheck(look._AUTHEN.misSail, 62) ? '<a href="javascript:" class="a_as_button a_as_green modify_onsale_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' +
					'<div class="publisher_panel look_hidden onsale_editor_panel" s_id="' + list.id + '">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/  + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<form id="modifyOnsaleForm' + list.id + '">' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2018/**开始时间：**/ + '</span><span><input type="text" class="text disabled normal" id="startDateInput' + list.id + '" readonly="readonly" value="' + look.dateFormat(new Date(parseInt(list.startTime)), "yyyy-MM-dd") + '" /><input type="text" class="text short" id="startTimeInput' + list.id + '" value="' + look.dateFormat(new Date(parseInt(list.startTime)), "hh:mm:ss") + '" maxlength="8" /></span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2019/**结束时间：**/ + '</span><span><input type="text" class="text disabled normal" id="endDateInput' + list.id + '" readonly="readonly" value="' + look.dateFormat(new Date(parseInt(list.endTime)), "yyyy-MM-dd") + '" /><input type="text" class="text short" id="endTimeInput' + list.id + '" value="' + look.dateFormat(new Date(parseInt(list.endTime)), "hh:mm:ss") + '" maxlength="8" /></span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2051/**有效期：**/ + '</span><span>' + list.days + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2057/**商品名称：**/ + '</span><span>' + list.goodsName + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2052/**类别：**/ + '</span><span>' + typeHtml + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2053/**类别ID：**/ + '</span><span>' + list.typeId + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2054/**购买类型：**/ + '</span><span>' + list.buyType + '</span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2055/**原价：**/ + '</span><span class="auto"><input type="text" class="text auto" name="costPrice" value="' + list.costPrice + '" /></span></div>' +
					'		<div class="publisher_row"><span class="label">' + look._I18N_DATA.$2056/**打折价：**/ + '</span><span class="auto"><input type="text" class="text auto" name="discountPrice" value="' + list.discountPrice + '" /></span></div>' +
					'		</form>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_onsale_subset" a_id="' + list.id + '">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
				datepickerGetter('#startDateInput' + list.id + ', #endDateInput' + list.id, null);
			});
			onsaleManageList.append('<div class="clear"></div>');
			//字典请求
//			if(!look._SAIL_SERVER_DIC_ARRAY){sailGetDictionaryRequest("server");}else{sailServerDictionaryCallback.Assay("select");}
			
			//[事件]修改
			$(".modify_onsale_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]确认修改
			$(".comfirm_modify_onsale_subset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val(),
					element = $(this).parents(".publisher_panel"),
					onsaleId = element.attr("s_id");
					startDate = $.trim($("#startDateInput" + onsaleId).val()),
					endDate = $.trim($("#endDateInput" + onsaleId).val()),
					startTime = $.trim($("#startTimeInput" + onsaleId).val()),
					endTime = $.trim($("#endTimeInput" + onsaleId).val()),
					startDateTime = new Date(Date.parse((startDate + " " + startTime).replace(/\-/g,"/"))).getTime(),
					endDateTime = new Date(Date.parse((endDate + " " + endTime).replace(/\-/g,"/"))).getTime(),
					reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/,
					verifyFlag = true;
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				$(element).find("input").each(function(){
					if($.trim($(this).val()) == ""){verifyFlag = false;$(this).focus();return false;}
				});
				if(!verifyFlag){look.showInfo.error(look._I18N_DATA.$481/**所有选项都不能为空…**/);return false;}
				if(!reg.test(startTime)){look.showInfo.error(look._I18N_DATA.$477/**开始时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#startTimeInput").focus();return false;}
				if(!reg.test(endTime)){look.showInfo.error(look._I18N_DATA.$478/**结束时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#endTimeInput").focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$845/**确定修改打折信息{onsale}？**/.replace(/{onsale}/ig, '<b class="color_yellow">' + onsaleId + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailModifyOnsaleRequest(localeId, onsaleId, '&startTime=' + startDateTime + '&endTime=' + endDateTime + '&' +$("#modifyOnsaleForm" + onsaleId).serialize());
					}
				});

			});
		}else{
			onsaleManageList.html('<p class="no_result">' + look._I18N_DATA.$309/**没有打折信息…**/ + '</p>');
		}
	}else{
		onsaleManageList.html('<p class="no_result">' + look._I18N_DATA.$309/**没有打折信息…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长
//* 修改“打折信息”callback
//*************************************
var sailModifyOnsaleCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$532/**：修改打折信息成功！**/);
		sailGetOnsaleListRequest($("#localeIdSelect").val());
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> OGP
//* 获取meta列表callback
//*************************************
var sailGetMetaListCallback = function(back){
	var sailOGPList = $("#sailOGPManageList");
	sailOGPList.html("");
	if (back.code == 0) {
		$("#resultCount").text((back.data.totalCount));
		if(publicInit.authenCheck(look._AUTHEN.misSail, 79)){$("#addOGPCell").fadeIn();}
		if (back.data && back.data.list && back.data.list.length != 0) {
			$.each(back.data.list, function(i, list){
				sailOGPList.append(
					'<tr file="' + list.file + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td><div class="icon_subset_cell">' + list.file +
					'		<a class="a_as_icon preview_link_subset" href="javascript:"><tt class="icon link_icon"></tt></a>' + 
					'	</div></td>' +
					'	<td>' + list.createDate + '</td>' +
					'	<td width="140px">' +
					(publicInit.authenCheck(look._AUTHEN.misSail, 79) && publicInit.authenCheck(look._AUTHEN.misSail, 81) ? '<a href="javascript:" class="a_as_button a_as_green modify_detail_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.misSail, 82) ? '　<a href="javascript:" class="a_as_button a_as_red delete_detail_subset">' + look._I18N_DATA.$638/**删除**/ + '</a>' : '') +
					'	</td>' +
					'</tr>'
				);
			});
			publicInit.tabelStyle();
			//[事件]查看链接
			$(".preview_link_subset").unbind("click").bind("click", function(){
				var file = $(this).parents("tr").attr("file");
				$.lookPop({
					type: -1,
					title: look._I18N_DATA.$1143/**链接地址**/,
					closeSubset: true,
					html:
						'<div style="width:720px;">' +
						'	<div class="pop_content_word"><span class="pop_content_span">' + look._GENERATE_ONLINE_URL + back.data.app + "/" + file.replace(/(.html)/ig, "") + '</span></div>' +
						'</div>'
				});
				look.selectContents(".pop_content_span");
				$(".pop_content_span").bind("click", function(){look.selectContents($(this));});
			});
			//[事件]修改
			$(".modify_detail_subset").unbind("click").bind("click", function(){
				if ($(this).hasClass("a_as_disabled")) {return false;}
				$(this).addClass("a_as_disabled");
				look._TEMP = $(this);
				sailGetMetaRequest($(this).parents("tr").attr("file"));
			});
			//[事件]删除
			$(".delete_detail_subset").unbind("click").bind("click", function(){
				var file = $(this).parents("tr").attr("file");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:560px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$885/**确认删除OGP meta {file}？**/.replace(/{file}/ig, '<i class="color_red">' + file + '</i>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailDeleteMetaRequest(file);
					}
				});
			});
		} else {
			sailOGPList.append('<tr><td colspan="6">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		sailOGPList.append('<tr><td colspan="6">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> OGP
//* 新增/修改/删除meta callback
//*************************************
var sailOperateMetaCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPop({id: "addOGPMetaPoper"});
		look.showInfo.right(back.code + ":" + back.message);
		sailGetMetaListRequest();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 船长 -> OGP
//* 获取meta callback
//*************************************
var sailGetMetaCallback = function(back){
	if (back.code == 0) {
		if(back.data){
			var addOGPMetaEvent = function(){
				//[事件]确认修改
				var name = $.trim($("#nameInput").val()),
					content = look.aceEditor.getValue();
				if(name == ""){look.showInfo.error(look._I18N_DATA.$7022/**文件名不能为空…**/);$("#nameInput").focus();return false;}
				if(look.aceEditor.getValue() == ""){look.showInfo.error(look._I18N_DATA.$559/**内容不能为空…**/);look.aceEditor.focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$884/**确认修改OGP meta？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailAddModifyMetaRequest(name, content);
					}
				});
			}
			$.lookPop({
				url: "game_account/sail/add_ogp_meta_poper.html",
				title: look._I18N_DATA.$5123/**修改OGP meta**/,
				closer: false,
				confirmSubset: true,
				id: "addOGPMetaPoper",
				confirmCallback: addOGPMetaEvent,
				cancelSubset: true,
				focusElement: "#nameInput",
				callback: function(){
					$("#nameInput").val(back.data.name);
					publicInit.inputTipStyle("#addOGPMetaPoper input.text", "#addOGPMetaPoper label tt");
					aceEditGetter({id: "addOGPMetaEditor", mode: "html", callback: function(){
						look.aceEditor.setValue(back.data.content)
					}});
				}
			});
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var sailGetMetaComplete = function(){
	look._TEMP.removeClass("a_as_disabled");
}

/*** sail_mis Callback END ***/

/*** game_help Callback START ***/

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 游戏列表管理
//* 获取游戏列表callback
//*************************************
var gameHelpGetGameListCallback = function(back){
	if(back.code == 0){
		if (back.data && back.data.content) {
			$(".publisher_panel").fadeIn().prev().hide();
			$("#gameListEditor").html(look.JSONFormat(decodeURIComponent(back.data.content), false));
			$("#publisherFileName").text('[' + back.data.file + ']');
			aceEditGetter({
				id: "gameListEditor"
			});
			//[事件]修改&发布游戏列表内容
			$("#publishGameListSubset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var gameListContent = encodeURIComponent(look.JSONFormat(look.aceEditor.getValue(), true));
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html: 
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$866/**确认修改{list}的数据？**/.replace(/{list}/ig, '<b class="color_yellow">' + look._I18N_DATA.$1141/**游戏列表**/ + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if (obj.hasClass("a_as_disabled")) {return false;}
						obj.addClass("a_as_disabled");
						gameHelpModifyGameListRequest(gameListContent);
					}
				});
			});
		} else {
			$(".publisher_panel").hide().prev().text(look._I18N_DATA.$314).show();
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 游戏列表管理
//* 修改游戏列表数据callback
//*************************************
var gameHelpModifyGameListCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$7002/**：游戏列表数据修改成功！**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 活动攻略管理
//* 获取游戏活动攻略列表callback
//*************************************
var gameHelpGetGameDetailCallback = function(back){
	var gameDetailList = $("#gameDetailList");
	gameDetailList.children("tr:first").nextAll().remove();
	if(back.code == 0){
		$("#resultCount").text(back.data.totalCount);
		if (publicInit.authenCheck(look._AUTHEN.gameHelp, 10)) {
			$("#gameDetailCell").fadeIn();
		}
		if(back.data.top){
			$("#gameTopCell").fadeIn();
			if (back.data.top.pic_url != "") {
				$("#previewTopSubset").show().prev().hide();
			}else{
				$("#previewTopSubset").hide().prev().show();
			}
			if (publicInit.authenCheck(look._AUTHEN.gameHelp, 5) && publicInit.authenCheck(look._AUTHEN.gameHelp, 15)) {
				$(".modify_top_cell").show();
				//[事件]更改主图
				$("#modifyTopSubset").unbind("click").bind("click", function(){
					function getPoperRequest(obj, left, url, callback){
						var offLeft = obj.offset().left - left,
							offTop = obj.offset().top + 22;
						$.get(url, function(text){
							$.lookPopDiv({left: offLeft, top: offTop, contentHtml: text, addClass: "modify_top_poper"});
							eval(callback());
						});
					}
					getPoperRequest($(this), 0, "game_account/help/modify_top_poper.html", function(){
						$("#picUrlInput").val(back.data.top.pic_url).focus();
						$("#linkInput").val(back.data.top.link)
						$("#popConfirmModifyTopSubset").unbind("click").bind("click", function(){
							if($(this).hasClass("a_as_disabled")){return false;}
							var picUrl = $.trim($("#picUrlInput").val()),
								link = $.trim($("#linkInput").val());
							gameHelpModifyGameTopRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("page_type"), encodeURIComponent(picUrl), encodeURIComponent(link));
							$(this).addClass("a_as_disabled");
						});
					});
				});
			}
			//[事件]查看主图
			$("#previewTopSubset").unbind("click").bind("click", function(){
				var imgObj = new Image();
				$.lookPop({
					type: -1,
					closer: false,
					title: "",
					html: '<div class="pop_content_pic"><img src="../images/image_loader.gif" /></div>'
				});
				imgObj.onload = function(){
					$.lookPop({
						type: -1,
						title: "",
						html: '<div class="pop_content_pic"><a href="' + (back.data.top.link != "" ? back.data.top.link  + '" target="_blank"' : "javascript:") + '"><img src="' + back.data.top.pic_url + '" /></a></div>'
					});
				};
				imgObj.onerror = function(){
					look.showInfo.error(look._I18N_DATA.$7003/**游戏主图加载失败…请检查图片链接或网络情况…**/);
					$.clearPop();
				}
				imgObj.src = back.data.top.pic_url;
			});
		}
		if(back.data.list && back.data.list.length != 0){
			$.each(back.data.list, function(i, list){
				gameDetailList.append(//list.replace(/^(\w+)_/ig, "").replace(/\.(\w+)/, "")
					'<tr>' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td><div class="icon_subset_cell">' + list.file +
					'		<a class="a_as_icon preview_link_subset" href="javascript:" file="' + list.file + '"><tt class="icon link_icon"></tt></a>' + 
					'	</div></td>' +
					'	<td><div st="' + list.title + '" class="game_detail_title_subset">' + (look.getByteLen(list.title) > 20 ? look.getByteVal(list.title, 20) + ".." : list.title) + '</td>' +
					'	<td>' + list.create_date + '</td>' +
					'	<td>' + list.update_date + '</td>' +
					'	<td width="140px">' +
					(publicInit.authenCheck(look._AUTHEN.gameHelp, 9) && publicInit.authenCheck(look._AUTHEN.gameHelp, 12) ? '<a href="javascript:" class="a_as_button a_as_green modify_detail_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.gameHelp, 11) ? '　<a href="javascript:" class="a_as_button a_as_red delete_detail_subset">' + look._I18N_DATA.$638/**删除**/ + '</a>' : '') +
					'	</td>' +
					'</tr>'
				);
			})
			publicInit.tabelStyle();
			$(".game_detail_title_subset").floater({
				closer:false,
				backgroundColor:"#333",
				borderColor:'#333',
				fontColor:'#fff',
				padding:[4,6,4,6]
			});
			//[事件]修改详细页
			$(".modify_detail_subset").unbind("click").bind("click", function(){
				var obj = $(this).parents("tr").children("td"),
					file = obj.eq(1).text(),
					title = obj.find(".game_detail_title_subset").attr("st");
				var modifyDetailEvent = function(obj){
					var title = $.trim($("#modifyDetailTitleInput").val());
					if(title == ""){look.showInfo.error(look._I18N_DATA.$573/**标题不能为空…**/);$("#modifyDetailTitleInput").focus();return false;}
					if(look.kindEditor.isEmpty()){look.showInfo.error(look._I18N_DATA.$574/**内容不能为空…**/);look.kindEditor.focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						clear: false,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$867/**确认修改游戏详细页{title}？**/.replace(/{title}/ig, '<b class="color_yellow">' + title + '</b>') + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							gameHelpModifyGameDetailRequest(look.getHashParam("appid"), look.getHashParam("server_id"), file, title, encodeURIComponent(look.kindEditor.html()));
							obj.addClass("a_as_disabled");
						}
					});
				}
				$.lookPop({
					url: "game_account/help/modify_detail_poper.html",
					title: look._I18N_DATA.$1142 + '<span class="pop_content_description">[' + title + ']</span>',
					closer: false,
					id: "popModifyDetailPoper",
					confirmSubset: true,
					confirmCallback: modifyDetailEvent,
					cancelSubset: true,
					focusElement: "#modifyDetailTitleInput",
					callback: function(){
						$("#modifyDetailTitleInput").val(title);
						publicInit.inputTipStyle(".modify_detail_poper_label input", ".modify_detail_poper_label tt");
						gameHelpGetGameDetailContentRequest(look.getHashParam("appid"), look.getHashParam("server_id"), file);
					}
				});
			});
			//[事件]删除详细页
			$(".delete_detail_subset").unbind("click").bind("click", function(){
				var obj = $(this).parents("tr").children("td"),
					file = obj.eq(1).text(),
					title = obj.eq(2).text();
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$868/**确认删除页面{title}？**/.replace(/{title}/ig, '<b class="color_yellow">' + look.getByteVal(title, 20) + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						gameHelpDelGameDetailRequest(look.getHashParam("appid"), look.getHashParam("server_id"), file);
						obj.addClass("a_as_disabled");
					}
				});
			});
			//[事件]查看链接
			$(".preview_link_subset").unbind("click").bind("click", function(){
				var link = look._GAME_HELP_ONLINE_URL + '#theme=detail&menu=' + look.getHashParam("page_type") + '&appid=' + look.getHashParam("appid") + '&server_id=' + look.getHashParam("server_id") + '&file=' + $(this).attr("file");
				$.lookPop({
					type: -1,
					title: look._I18N_DATA.$1143/**链接地址**/,
					closeSubset: true,
					html:
						'<div style="width:720px;">' +
						'	<div class="pop_content_word"><span class="pop_content_span">' + link + '</span></div>' +
						'</div>'
				});
				look.selectContents(".pop_content_span");
				$(".pop_content_span").bind("click", function(){look.selectContents($(this));});
			});
		}else{
			gameDetailList.append('<tr><td colspan="6">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		}
	}else{
		gameDetailList.append('<tr><td colspan="6">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 活动攻略管理
//* 修改游戏主图callback
//*************************************
var gameHelpModifyGameTopCallback = function(back){
	if (back.code == 0) {
		$.clearPopDiv(".modify_top_poper");
		look.showInfo.right(back.code + ":" + back.message);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}
var gameHelpModifyGameTopComplete = function(){
	$("#popConfirmModifyTopSubset").removeClass("a_as_disabled");
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 活动攻略管理
//* 获取游戏详细页内容callback
//*************************************
var gameHelpGetGameDetailContentCallback = function(back){
	if(back.code == 0){
		var html = back.data && back.data.content != "" ? back.data.content : "";
		if(html == ""){
			$(".pop_content_description").attr("st", look._I18N_DATA.$5107/**该详细页内容为空，请使用下面的编辑器补充内容**/).css("text-indent", "0").floater({
				direction: "right"
			});
		}
		kindeditorGetter({
			id: "#editorTextarea",
			html: decodeURIComponent(html)
		});
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 活动攻略管理
//* 修改游戏详细页callback
//*************************************
var gameHelpModifyGameDetailCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPop({id: "popModifyDetailPoper"});
		look.showInfo.right(back.code + look._I18N_DATA.$7004/**：页面数据修改成功！**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 活动攻略管理
//* 新增游戏详细页callback
//*************************************
var gameHelpAddGameDetailCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPop({id: "popAddGameDetailPoper"});
		look.showInfo.right(back.code + ":" + back.message);
		location.hash = look.setParam([["page_type", $("#pageTypeSelect").val()]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 活动攻略管理
//* 删除游戏详细页callback
//*************************************
var gameHelpDelGameDetailCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 联系方式管理
//* 获取联系方式callback
//*************************************
var gameHelpGetGameContactCallback = function(back){
	if(back.code == 0){
		if(back.data && back.data.content){
			$(".publisher_panel").fadeIn().prev().hide();
			$("#gameContactEditor").html(decodeURIComponent(back.data.content));
			$("#publisherFileName").text(back.data.file ? '[' + back.data.file + ']' : '');
			aceEditGetter({id: "gameContactEditor"});
			//[事件]修改&发布游戏联系方式内容
			$("#publishGameContactSubset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var gameContactContent = encodeURIComponent(look.aceEditor.getValue());
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$869/**确认修改{word}的数据？**/.replace(/{word}/ig, '<b class="color_yellow">' + look._I18N_DATA.$1144/**联系方式**/ + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						gameHelpModifyGameContactRequest(look.getHashParam("appid"), look.getHashParam("server_id"), gameContactContent);
					}
				});
			});
		}else{
			$(".publisher_panel").hide().prev().text(look._I18N_DATA.$304).show();
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 联系方式管理
//* 修改联系方式callback
//*************************************
var gameHelpModifyGameContactCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 数据文件备份
//* 获取数据文件备份列表callback
//*************************************
var gameHelpGetGameBackupListCallback = function(back){
	var gameBackupList = $("#gameBackupList");
	gameBackupList.children("tr:first").nextAll().remove();
	if (back.code == 0) {
		$("#resultCount").text(back.data.totalCount);
		if(back.data && back.data.list && back.data.list.length != 0){
			$.each(back.data.list, function(i, list){
				gameBackupList.append(
					'<tr tree_data="' + encodeURIComponent(list.tree.replace(/(\r\n)|(\n)/g, "<br>").replace(/[\b]/g, "　")) + '" file_name="' + list.file + '">' +
					'	<td>' + (i + 1) + '</td>' +
					'	<td>' + list.file + '</td>' +
					'	<td>' + list.create_date + '</td>' +
					'	<td width="140px">' +
					(publicInit.authenCheck(look._AUTHEN.gameHelp, 17) ? '<a href="javascript:" class="a_as_button a_as_green preview_tree_subset">' + look._I18N_DATA.$1145/**详情**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.gameHelp, 20) ? '　<a href="javascript:" class="a_as_button a_as_red delete_backup_subset">' + look._I18N_DATA.$638/**删除**/ + '</a>' : '') +
					'	</td>' +
					'</tr>'
				);
			})
			publicInit.tabelStyle();
			//[事件]查看详情
			$(".preview_tree_subset").unbind("click").bind("click", function(){
				if(!publicInit.authenCheck(look._AUTHEN.gameHelp, 18)){return false;}
				var obj = $(this).parents("tr"),
					treeHtml = obj.attr("tree_data"),
					file = obj.attr("file_name");
				$.lookPop({
					url: "game_account/help/backup_tree_poper.html",
					title: look._I18N_DATA.$1146/**备份文件列表**/ + '<span class="pop_content_description">[' + look._I18N_DATA.$2078/**目录：**/ + file + ']</span>',
					callback: function(){
						$("#popBackupTreeCell").html(decodeURIComponent(treeHtml));
					}
				});
			});
			//[事件]删除备份
			$(".delete_backup_subset").unbind("click").bind("click", function(){
				var fold = $(this).parents("tr").attr("file_name");
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$870/**确认删除备份数据文件{fold}？**/.replace(/{fold}/ig, '<b class="color_yellow">' + fold + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						gameHelpDeleteGameBackupRequest(fold);
					}
				});
			});
		}else{
			gameBackupList.append('<tr><td colspan="4">' + look._I18N_DATA.$311/**没有备份数据…**/ + '</td></tr>');
		}
	}else{
		gameBackupList.append('<tr><td colspan="4">' + look._I18N_DATA.$311/**没有备份数据…**/ + '</td></tr>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏活动攻略 -> 数据文件备份
//* 执行备份&删除备份文件callback
//*************************************
var gameHelpGameBackupCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + ":" + back.message);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** game_help Callback END ***/

/*** coupon Callback START ***/

//*************************************
//* 游戏帐号管理系统 -> 游戏奖励管理
//* 获取奖励码条件callback
//*************************************
var getCouponConditionListCallback = function(back){
	var couponConditionList = $("#couponConditionList");
	couponConditionList.empty();
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "-"));
		if(back.data.length != 0){
			$.each(back.data, function(i, list){
				var excludeCouponTypeHtml = '', channelsHtml = '', channelsCheckbox = '', serversHtml = '', serversCheckbox = '', reusabilityHtml = '', delHtml = '', reusabilitySelect = '<select name="reusability">', delSelect = '<select name="del">';
				if (list.excludeCouponType) {
					$.each(list.excludeCouponType.split(","), function(j, exclude){
						excludeCouponTypeHtml += '<em>' + exclude + '</em>';
					});
				} else {
					excludeCouponTypeHtml = "N/A";
				}
//				if (look._STAT_INCOME_DIC_ARRAY[0].length != 0) {
//					$.map(look._STAT_INCOME_DIC_ARRAY[0], function(n){
//						channelsCheckbox += '<a href="javascript:" c_id="' + n[0] + '" class="a_as_checkbox look_box_corner';
//						if (list.channels) {
//							$.each(list.channels.split(","), function(j, channel){
//								if (n[0] == channel) {
//									channelsHtml += '<em>' + n[1] + '</em>';
//									channelsCheckbox += ' selected';
//								}
//							});
//						} else {
//							channelsHtml = "N/A";
//						}
//						channelsCheckbox += '"><em>' + n[1] + '</em></a>';
//					});
//				}
					if (list.channels) {
						$.each(list.channels.split(","), function(j, channel){
							channelsHtml += '<em>' + channel + '</em>';
						});
					} else {
						channelsHtml = "N/A";
					}
				if (look._APP_INFO_DIC_ARRAY[0].length != 0) {
					$.map(look._APP_INFO_DIC_ARRAY, function(n){
						if (look.getHashParam("appid") == n[0]) {
							$.each(n[2], function(k, s){
								serversCheckbox += '<a href="javascript:" s_id="' + s.split(":")[0] + '" class="a_as_checkbox look_box_corner';
								if (list.servers) {
									$.each(list.servers.split(","), function(j, server){
										if (s.split(":")[0] == server) {
											serversHtml += '<em>' + s.split(":")[1] + '</em>';
											serversCheckbox += ' selected';
										}
									});
								} else {
									serversHtml = "N/A";
								}
								serversCheckbox += '"><em>' + s.split(":")[1] + '</em></a>';
							});
						}
					});
				}
				switch(list.reusability){
					case 0 : reusabilityHtml = look._I18N_DATA.$730/**否**/; reusabilitySelect += '<option value="0" selected>' + look._I18N_DATA.$730/**否**/ + '</option><option value="1">' + look._I18N_DATA.$729/**是**/ + '</option></select>'; break;
					case 1 : reusabilityHtml = look._I18N_DATA.$729/**是**/; reusabilitySelect += '<option value="0">' + look._I18N_DATA.$730/**否**/ + '</option><option value="1" selected>' + look._I18N_DATA.$729/**是**/ + '</option></select>'; break;
					default : reusabilityHtml = 'N/A'; reusabilitySelect += '<option value="">' + look._I18N_DATA.$10/**未知**/ + '</option></select>'; break;
				}
				switch(list.del){
					case 0 : delHtml = look._I18N_DATA.$730/**否**/; delSelect += '<option value="0" selected>' + look._I18N_DATA.$730/**否**/ + '</option><option value="1">' + look._I18N_DATA.$729/**是**/ + '</option></select>'; break;
					case 1 : delHtml = look._I18N_DATA.$729/**是**/; delSelect += '<option value="0">' + look._I18N_DATA.$730/**否**/ + '</option><option value="1" selected>' + look._I18N_DATA.$729/**是**/ + '</option></select>'; break;
					default : delHtml = 'N/A'; delSelect += '<option value="">' + look._I18N_DATA.$10/**未知**/ + '</option></select>'; break;
				}
				couponConditionList.prepend(
					'<div class="publisher_panel coupon_condition_panel add_coupon_condition_panel">' +
					'	<div class="publisher_cell top"><div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/ + list.id+ '<span class="right"><tt>' + look._I18N_DATA.$2079/**创建日期：**/ + '</tt>' + list.createTime + '</span></div></div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label auto">' + look._I18N_DATA.$2092/**名称：**/ + '</span><span>' + list.name + '</span></div>' +
					'		<div class="publisher_row"><span class="label auto">' + look._I18N_DATA.$2091/**奖励信息：**/ + '</span><span>' + list.reward + '</span></div>' +
					'		<div class="publisher_row auto_height"><span class="label auto">' + look._I18N_DATA.$2090/**排斥类型：**/ + '</span><span class="item_cell">' + excludeCouponTypeHtml + '</span><div class="clear"></div></div>' +
					'		<div class="publisher_row auto_height"><span class="label auto">' + look._I18N_DATA.$2089/**渠道：**/ + '</span><span class="item_cell">' + channelsHtml + '</span><div class="clear"></div></div>' +
					'		<div class="publisher_row auto_height"><span class="label auto">' + look._I18N_DATA.$2088/**分服：**/ + '</span><span class="item_cell">' + serversHtml + '</span><div class="clear"></div></div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2087/**奖励码类型：**/ + '</span><span class="double">' + (list.couponType ? list.couponType : "N/A") + '</span>' +
					'			<span class="label">' + look._I18N_DATA.$2086/**最少购买钻石数：**/ + '</span><span class="double">' + (list.buck ? list.buck : "N/A") + '</span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2085/**最低vip等级：**/ + '</span><span class="double">' + (list.vip ? list.vip : "N/A") + '</span>' +
					'			<span class="label">' + look._I18N_DATA.$2084/**最低游戏等级：**/ + '</span><span class="double">' + (list.level ? list.level : "N/A") + '</span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2083/**是否可多人使用：**/ + '</span><span class="double">' + reusabilityHtml + '</span>' +
					'			<span class="label">' + look._I18N_DATA.$2082/**是否弃用：**/ + '</span><span class="double">' + delHtml + '</span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">openKey：</span><span class="double">' + list.openKey + '</span>' +
					'		</div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom static">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell"><span>' + look._I18N_DATA.$2081/**开始时间：**/ + '</span><span>' + (list.startTime ? list.startTime : "N/A") + '</span></div>' +
					'			<div class="bottom_cell"><span>' + look._I18N_DATA.$2080/**过期时间：**/ + '</span><span>' + (list.endTime ? list.endTime : "N/A") + '</span></div>' + 
					'		</div>' + 
					'		<div class="subset_cell">' +
					(publicInit.authenCheck(look._AUTHEN.coupon, 4) ? '<a href="javascript:" class="a_as_button a_as_green modify_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.coupon, 5) ? '<a href="javascript:" class="a_as_button preview_subset" c_id="' + list.id + '"><input type="text" class="text look_box_corner" title="' + look._I18N_DATA.$5108/**0代表查询全部**/ + '" value="' + list.idx + '" />' + look._I18N_DATA.$5109/**查看奖励码（共{num}批次）**/.replace(/{num}/ig, '<tt class="generate_times">' + list.idx + '</tt>') + '</a>' : '') +
					(publicInit.authenCheck(look._AUTHEN.coupon, 6) ? '<a href="javascript:" class="a_as_button a_as_gray generate_subset right" c_id="' + list.id + '">' + look._I18N_DATA.$660/**生成奖励码**/ + '</a>' : '') +
					'		</div>' + 
					'	</div>' + 
					'</div>' +
					'<div class="publisher_panel coupon_condition_panel add_coupon_condition_panel look_hidden">' +
					'	<form>' +
					'	<input type="hidden" name="id" value="' + list.id+ '" /><input type="hidden" name="appid" value="' + list.appid + '" /><input type="hidden" name="agent" value="' + list.agent + '" />' +
					'	<div class="publisher_cell top"><div class="publisher_title">' + look._I18N_DATA.$2017/**编号：**/ + list.id+ '<span class="right"><tt>' + look._I18N_DATA.$2079/**创建日期：**/ + '</tt>' + list.createTime + '</span></div></div>' +
					'	<div class="publisher_cell">' +
					'		<label for="name' + list.id+ '" class="publisher_label"><tt>' + look._I18N_DATA.$1020/**名称**/ + '<i class="color_red">*</i></tt><input type="text" class="text auto" name="name" id="name' + list.id+ '" value="' + list.name+ '" required /></label>' +
					'		<label for="reward' + list.id+ '" class="publisher_label"><tt>' + look._I18N_DATA.$1147/**奖励信息**/ + '<i class="color_red">*</i></tt><input type="text" class="text auto" name="reward" id="reward' + list.id+ '" value="' + list.reward+ '" required /></label>' +
					'		<label for="excludeCouponType' + list.id+ '" class="publisher_label"><tt>' + look._I18N_DATA.$1148/**排斥类型**/ + look._I18N_DATA.$1150/**（多个以“,”分割）**/ + '</tt><input type="text" class="text auto" name="excludeCouponType" id="excludeCouponType' + list.id+ '" value="' + (list.excludeCouponType ? list.excludeCouponType : "") + '" /></label>' +
//					'		<div class="publisher_row auto_height"><span class="label auto">' + look._I18N_DATA.$2089/**渠道：**/ + '</span><span class="checkbox_cell" c_type="channel" id="channelCheckbox' + list.id + '">' + channelsCheckbox + '</span><div class="clear"></div></div>' +
					'		<label for="channels' + list.id+ '" class="publisher_label"><tt>' + look._I18N_DATA.$1149/**渠道**/ + look._I18N_DATA.$1150/**（多个以“,”分割）**/ + '</tt><input type="text" class="text auto" name="channels" id="channels' + list.id+ '" value="' + list.channels+ '" /></label>' +
					'		<div class="publisher_row auto_height"><span class="label auto">' + look._I18N_DATA.$2088/**分服：**/ + '</span><span class="checkbox_cell" c_type="server" id="serverIdCheckbox' + list.id + '">' + serversCheckbox + '</span><div class="clear"></div></div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2087/**奖励码类型：**/ + '</span><span class="double">' + (list.couponType ? list.couponType : "N/A") + '</span>' +
					'			<span class="label">' + look._I18N_DATA.$2086/**最少购买钻石数：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="buck" value="' + (list.buck ? list.buck : "") + '" /></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2085/**最低vip等级：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="vip" value="' + (list.vip ? list.vip : "") + '" /></span>' +
					'			<span class="label">' + look._I18N_DATA.$2084/**最低游戏等级：**/ + '</span><span class="double"><input type="text" class="text middleshort" name="level" value="' + (list.level ? list.level : "") + '" /></span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">' + look._I18N_DATA.$2083/**是否可多人使用：**/ + '</span><span class="double">' + reusabilitySelect + '</span>' +
					'			<span class="label">' + look._I18N_DATA.$2082/**是否弃用：**/ + '</span><span class="double">' + delSelect + '</span>' +
					'		</div>' +
					'		<div class="publisher_row">' +
					'			<span class="label">openKey：</span><span class="double">' + list.openKey + '</span>' +
					'		</div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom static">' +
					'		<div class="bottom_cell_out">' +
					'			<div class="bottom_cell"><span>' + look._I18N_DATA.$2081/**开始时间：**/ + '</span><input type="text" class="text short disabled" id="startDateInput' + list.id + '" name="startTime" readonly="readonly" value="' + (list.startTime ? list.startTime.substr(0, 10) : "") + '" /></div>' +
					'			<div class="bottom_cell"><span>' + look._I18N_DATA.$2080/**过期时间：**/ + '</span><input type="text" class="text short disabled" id="endDateInput' + list.id + '" name="endTime" readonly="readonly"  value="' + (list.endTime ? list.endTime.substr(0, 10) : "") + '" /></div>' + 
					'		</div>' + 
					'		<div class="subset_cell"><a href="javascript:" class="a_as_button comfirm_modify_subset">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a></div>' + 
					'	</div>' + 
					'	</form>' +
					'</div>'
				);
				datepickerGetter('#startDateInput' + list.id + ', #endDateInput' + list.id, null);
				publicInit.checkboxStyle('#channelCheckbox' + list.id + ', #serverIdCheckbox' + list.id);
			});
			couponConditionList.append('<div class="clear"></div>');
			publicInit.inputTipStyle(".publisher_cell label input.text", ".publisher_cell label tt");
			//[事件]修改
			$(".modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().find("input.text:first").focus();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]确认修改
			$(".comfirm_modify_subset").unbind("click").bind("click", function(){
				var formObj = $(this).parents("form"),
//					channel = function(){
//						var arr = new Array();
//						formObj.find("span[c_type='channel']").children(".selected").each(function(){
//							arr.push($(this).attr("c_id"));
//						});
//						return arr;
//					},
					server = function(){
						var arr = new Array();
						formObj.find("span[c_type='server']").children(".selected").each(function(){
							arr.push($(this).attr("s_id"));
						});
						return arr;
					}
					ifBlank = false;
				formObj.find("*[required]").each(function(){
					if($.trim($(this).val()) == ""){ifBlank = true;$(this).focus();return false;}
				});
				if(ifBlank){look.showInfo.error(look._I18N_DATA.$576/**所有星号均为必填项…**/);return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$871/**确定修改本条奖励码条件？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
//						modifyCouponConditionRequest(formObj.serialize() + '&channels=' + channel() + '&servers=' + server());
						modifyCouponConditionRequest(formObj.serialize() + '&servers=' + server());
					}
				});
			});
			//[事件]查看奖励码
			$(".preview_subset input.text").unbind("click").bind("click", function(event){
				event.stopPropagation();
			});
			$(".preview_subset").unbind("click").bind("click", function(){
				var id = $(this).attr("c_id"), idx = $.trim($(this).children("input.text").val());
				look._TEMP = 1;
				$.lookPop({url: 'game_account/coupon/coupon_preview_poper.html'});
				getCouponListRequest(id, idx, look._TEMP);
				//[事件]页码切换
				$("#popPageSubsetCell a").unbind("click").bind("click", function(){
					var obj = $(this), pageType = $(this).attr("p_type");
					if(obj.hasClass("a_as_disabled")){return false;}
					switch(pageType){
						case "prev" :
							look._TEMP--;
						break;
						case "next" : 
							look._TEMP++;
						break;
					}
					getCouponListRequest(id, idx, look._TEMP);
				});
			});
			//[事件]生成奖励码
			$(".generate_subset").unbind("click").bind("click", function(){
				var subsetObj = $(this), id = $(this).attr("c_id");
				function getPoperRequest(obj, url, callback){
					var offLeft = obj.offset().left - 182,
						offTop = obj.offset().top - 162;
					$.get(url, function(text){
						$.lookPopDiv({
							left: offLeft,
							top: offTop,
							contentHtml: text
						});
						callback();
					});
				}
				var generateCallback = function(){
					$("#popCouponPrefixInput").focus();
					//[事件]确认生成
					$("#popGenerateSubset").unbind("click").bind("click", function(){
						if($(this).hasClass("a_as_disabled")){return false;}
						var prefix = $.trim($("#popCouponPrefixInput").val()),
							num = $.trim($("#popCouponNumberInput").val()),
							length = $.trim($("#popCouponLengthInput").val()),
							ifBlank = false;
						$(this).parents("form").find("*[required]").each(function(){
							if($.trim($(this).val()) == ""){ifBlank = true;$(this).focus();return false;}
						});
						if(ifBlank){look.showInfo.error(look._I18N_DATA.$576/**所有星号均为必填项…**/);return false;}
						if(isNaN(num)){look.showInfo.error(look._I18N_DATA.$7005/**生成数量应为数字…**/);$("#popCouponNumberInput").focus();return false;}
						if(isNaN(length)){look.showInfo.error(look._I18N_DATA.$7006/**奖励码长度应为数字…**/);$("#popCouponLengthInput").focus();return false;}
						if(num > 50000){look.showInfo.error(look._I18N_DATA.$7007/**生成数量不能大于50k…**/);$("#popCouponNumberInput").focus();return false;}
						if(length > 20 || length < 6){look.showInfo.error(look._I18N_DATA.$7008/**奖励码长度应在6～20之间…**/);$("#popCouponLengthInput").focus();return false;}
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$66/**提醒**/,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$872/**确认按本条件生成奖励码？**/ + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if(obj.hasClass("a_as_disabled")){return false;}
								obj.addClass("a_as_disabled");
								look._TEMP = subsetObj;
								generateCouponRequest(id, prefix, num, length);
							}
						});
					});
					//[事件]查询奖励码前缀
					$("#popGetCouponPrefixSubset").unbind("click").bind("click", function(){
						var prefix = $.trim($("#popCouponPrefixInput").val());
						if(prefix == ""){look.showInfo.error(look._I18N_DATA.$7009/**请填写奖励码前缀再查询…**/);$("#popCouponPrefixInput").focus();return false;}
						$.lookPop({
							type: -1,
							title: look._I18N_DATA.$5110/**{title}的奖励码前缀信息**/.replace(/{title}/ig, prefix),
							html: '<div class="pop_content_text pop_cell pop_app_content_cell" id="popCouponPrefixCell"><img src="../images/small_loader.gif" class="loader_icon" /></div>',
						});
						getCouponPrefixRequest(prefix);
					});
				}
				getPoperRequest($(this), "game_account/coupon/generate_coupon_poper.html", generateCallback);
			});
		}else{
			couponConditionList.html('<p class="no_result">' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		}
	}else{
		couponConditionList.html('<p class="no_result">' + look._I18N_DATA.$316/**没有任何数据…**/ + '</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏奖励管理 -> 奖励码条件
//* 创建callback
//*************************************
var createCouponConditionCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv();
		look.showInfo.right(back.code + look._I18N_DATA.$7010/**：创建成功…**/);
		location.hash = look.setParam([["appid", $("#appIdSelect").val()], ["agent", $("#agentSelect").val()]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏奖励管理 -> 奖励码条件
//* 修改callback
//*************************************
var modifyCouponConditionCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$7011/**：修改成功…**/);
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏奖励管理 -> 奖励码前缀
//* 获取callback
//*************************************
var getCouponPrefixCallback = function(back){
	var popCouponPrefixCell = $("#popCouponPrefixCell");
	if (back.code == 0) {
		if (back.data && back.data.message) {
			//dataHtml += '<span class="look_cell"><tt>' +  list.split(" ")[0] + '</tt> [<b class="color_yellow">' +  list.split(" ")[1] + '</b>]</span>';
			popCouponPrefixCell.empty();
			$.each(back.data.message.split(","), function(i, list){
				popCouponPrefixCell.append('<span class="look_cell">' + look._I18N_DATA.$2093/**长度：**/ + '[<b class="color_yellow">' +  list.split(":")[0] + '</b>]<br/>' + look._I18N_DATA.$93/**数量：**/ + '[<b class="color_green">' +  list.split(":")[1] + '</b>]</span>')
			});
			$.positionDiv();
		}else{
			popCouponPrefixCell.html('<div class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</div>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏奖励管理 -> 奖励码信息
//* 获取callback
//*************************************
var getCouponListCallback = function(back){
	var popCouponInfoCell = $("#popCouponInfoCell");
	if (back.code == 0) {
		if (back.data && back.data.length != 0) {
			if(back.data.length < 5000){$("#popPageSubsetCell a[p_type='next']").addClass("a_as_disabled").prev().removeClass("a_as_disabled");}
			if(look._TEMP == 1){$("#popPageSubsetCell a[p_type='prev']").addClass("a_as_disabled");}
			var someFn = function(){
				popCouponInfoCell.empty();
				$.each(back.data, function(i, list){
					popCouponInfoCell.append('<span class="look_cell"><tt>' +  list + '</tt></span>');
				});
			};
			someFn();
			//[事件]全选
			$("#selectedAllSubset").unbind("click").bind("click", function(){
				$(this).hide().next().show();
				var newHtml = "";
				$.each(back.data, function(i, list){
					newHtml += (i == 0 ? "" : ",<br>") + list;
				});
				popCouponInfoCell.html('<p>' + newHtml + '</p>');
				look.selectContents("#popCouponInfoCell p");
			});
			$("#cancelSelectedAllSubset").unbind("click").bind("click", function(){
				$(this).hide().prev().show();
				someFn();
			});
		}else{
			popCouponInfoCell.html('<div class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</div>');
			$.positionDiv();
			//下一页禁用
			$("#popPageSubsetCell a[p_type='next']").addClass("a_as_disabled").prev().removeClass("a_as_disabled");
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 游戏奖励管理 -> 奖励码信息
//* 生成callback
//*************************************
var generateCouponCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv();
		if(back.data && back.data.result != undefined){
			switch(back.data.result){
				case -1 : look.showInfo.error(back.code + look._I18N_DATA.$7012/**：重复数据太多,生成随机码失败…**/);
				break;
				case -2 : look.showInfo.error(back.code + look._I18N_DATA.$7013/**：请稍后再试…**/);
				break;
				default : 
					if(back.data.result >= 0){
						var obj = look._TEMP.parents(".publisher_panel").find(".generate_times");
						obj.text(parseInt(obj.text()) + 1);
						look.showInfo.right(back.code + look._I18N_DATA.$7014/**：重复key个数…**/);
					}else{
						look.showInfo.error(back.code + look._I18N_DATA.$7015/**：未知错误…**/);
					}
			}
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** coupon Callback END ***/

/*** web_chat Callback START ***/

//*************************************
//* 游戏帐号管理系统 -> 聊天室管理
//* 获取权限令牌callback
//*************************************
var webChatGetTokenCallback = function(back){
	if (back.code == 0) {
		if (back.data && back.data != "") {
			Look.prototype._IM10155.User.token = back.data;
			
			initLoader.webChatDoWebSocketFunction.doIt();
			//设置当前所在聊天室
			var getAppTitleTimer = setInterval(function(){
				if($("#appIdSelect option:selected").val() != ""){
					$("#currentChatRoom").text($("#appIdSelect option:selected").text() + " - " + $("#serverIdSelect option:selected").text());
					$("#adminNameCell").text(look._ADMIN.Get_NAME());
					$("#adminIdCell").text(look._ADMIN.uid);
					//[事件]弹出修改输入框
					if (publicInit.authenCheck(look._AUTHEN.webChat, 12)) {
						$(".modify_adminname_subset").unbind("click").bind("click", function(){
							var obj = $(this);
							$.get("game_account/web_chat/modify_admin_name_poper.html", function(text){
								$.lookPopDiv({
									left: obj.prev().offset().left,
									top: obj.offset().top + 20,
									addClass: "web_chat_modify_admin_name",
									ifRemove: false,
									contentHtml: text
								});
								$("#poperNewAdminName").focus();
								//[事件]修改管理员昵称
								$("#poperModifyAdminNameSubset").bind("click", function(){
									var newAdminName = $.trim($("#poperNewAdminName").val());
									if(newAdminName == ""){look.showInfo.error(look._I18N_DATA.$7016/**新昵称不能为空…**/);$("#poperNewAdminName").focus();return false;}
									look._ADMIN.Set_NAME(newAdminName);$("#adminNameCell").text(newAdminName);
									$.clearPopDiv({
										id: ".web_chat_modify_admin_name"
									});
								});
							});
						}).show();
					}
					
					clearInterval(getAppTitleTimer);
				}
			}, 1000);
		}else{
			initLoader.webChatDoWebSocketFunction.showTips.error(look._I18N_DATA.$7017/**权限令牌为空…**/);
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 聊天室管理-> 屏蔽词管理
//* 获取屏蔽词数据callback
//*************************************
var webChatGetBanWordsCallback = function(back){
	var banWordsPublisherPanel = $("#banWordsPublisherPanel");
	if(back.code == 0){
		if (back.data && back.data.content) {
			banWordsPublisherPanel.fadeIn().prev().hide();
			$("#banWordsEditor").html(decodeURIComponent(back.data.content));
			$("#publisherFileName").text('[' + back.data.file + ']');
			aceEditGetter({
				id: "banWordsEditor",
				mode: "text"
			});
			//[事件]保存修改的屏蔽词内容
			$("#saveBanWordsSubset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var banWordsContent = look.aceEditor.getValue();
				if(banWordsContent == decodeURIComponent(back.data.content)){look.showInfo.error(look._I18N_DATA.$444);return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html: 
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$873/**确认保存修改的屏蔽词数据？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if (obj.hasClass("a_as_disabled")) {return false;}
						obj.addClass("a_as_disabled");
						webChatModifyBanWordsRequest(look.getHashParam("appid") + look.getHashParam("server_id"), encodeURIComponent(banWordsContent));
					}
				});
			});
		} else {
			banWordsPublisherPanel.hide().prev().text(look._I18N_DATA.$314).show();
		}
	}else{
		banWordsPublisherPanel.hide().prev().text(look._I18N_DATA.$314).show();
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 聊天室管理-> 屏蔽词管理
//* 修改屏蔽词数据callback
//*************************************
var webChatModifyBanWordsCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$7018/**：修改的屏蔽词数据保存成功！**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 聊天室管理-> 实时监测
//* 清除用户发言callback
//*************************************
var webChatClearMessageCallback= function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv();
		initLoader.webChatDoWebSocketFunction.doIt();
		look.showInfo.right(back.code + "：" + back.message);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 聊天室管理-> 实时监测
//* 禁言callback
//*************************************
var webChatBanUserCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv();
		look.showInfo.right(back.code + "：" + back.message);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 聊天室管理-> 禁言管理
//* 获取禁言用户列表callback
//*************************************
var webChatGetBanUsersCallback = function(back){
	var banUsersPublisherPanel = $("#banUsersPublisherPanel");
	if(back.code == 0){
		if (back.data && back.data.content) {
			banUsersPublisherPanel.fadeIn().prev().hide();
			$("#banUsersEditor").html(look.JSONFormat(decodeURIComponent(back.data.content), false));
			$("#publisherFileName").text('[' + back.data.file + ']');
			aceEditGetter({
				id: "banUsersEditor"
			});
			//[事件]保存修改的禁言用户数据
			$("#saveBanUsersSubset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var banUsersContent = look.JSONFormat(look.aceEditor.getValue(), true);
				if(banUsersContent == decodeURIComponent(back.data.content)){look.showInfo.error(look._I18N_DATA.$444);return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html: 
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$874/**确认保存修改的禁言用户数据？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if (obj.hasClass("a_as_disabled")) {return false;}
						obj.addClass("a_as_disabled");
						webChatModifyBanUsersRequest(look.getHashParam("appid") + look.getHashParam("server_id"), encodeURIComponent(banUsersContent));
					}
				});
			});
		} else {
			banUsersPublisherPanel.hide().prev().text(look._I18N_DATA.$314).show();
		}
	}else{
		banUsersPublisherPanel.hide().prev().text(look._I18N_DATA.$314).show();
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 聊天室管理-> 禁言管理
//* 修改禁言用户数据callback
//*************************************
var webChatModifyBanUsersCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + look._I18N_DATA.$7019/**：修改的禁言用户数据保存成功！**/);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 游戏帐号管理系统 -> 聊天室管理 -> 系统维护
//* 获取&更改维护状态callback
//*************************************
var webChatSystemMaintainCallback = function(back){
	if (back.code == 0) {
		if(back.data != undefined){
			$(".maintain_subset[status='" + !back.data + "']").show();
			//[事件]维护
			$(".maintain_subset").unbind("click").bind("click", function(){
				var status = $(this).attr("status"), maintain, word = $(this).text();
				switch(status){
					case "true": maintain = true;
					break;
					case "false": maintain = false;
					break;
					default: maintain = false;
				}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$703/**重要提醒**/,
					html: 
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$880/**确定要对聊天系统进行{maintain}？**/.replace(/{maintain}/ig, '<b class="color_red">' + word + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if (obj.hasClass("a_as_disabled")) {return false;}
						obj.addClass("a_as_disabled");
						webChatSystemMaintainRequest(initLoader.webChatDoWebSocketFunction.app, maintain);
					}
				});
			});
		}else{
			$.clearPop();
			location.hash = look.setParam([[]], location.hash);
			look.showInfo.right(back.code + ":" + back.message);
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** web_chat Callback END ***/

/*** app Callback START ***/

//*************************************
//* 应用管理系统 -> 公共
//* 获取广告商字典callback
//*************************************
var appGetAdvertiserDictionaryCallback = {
	Check : function(callback){
		if(typeof(look._APP_ADVERTISER_DIC) == "undefined"){
			Look.prototype._APP_ADVERTISER_DIC = null;
		}
		look._APP_ADVERTISER_DIC == null ? appGetAdvertiserDictionaryRequest() : typeof(callback) == "function" ? callback() : null;
	},
	Convert : function(back){
		if (back.code == 0) {
			if (back.data.length != 0) {
				look._APP_ADVERTISER_DIC = back.data;
				$("#advertiserSelect").length != 0 ? appGetAdvertiserDictionaryCallback.AssaySelect() : null;
			} else {
				look.showInfo.error(back.code + "：广告商数据为空");
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	AssaySelect : function(){
		look._APP_ADVERTISER_DIC.length == 1 ? $("#advertiserSelect").empty() : $("#advertiserSelect").children().slice(1).remove();
		$.each(look._APP_ADVERTISER_DIC, function(i, list){
			$("#advertiserSelect").append('<option value="' + list + '">' + list + '</option>');
		});
	}
}

//*************************************
//* 应用管理系统 -> 广告管理
//* 获取代理商列表callback
//*************************************
var appGetAgentListCallback = {
	Check : function(callback){
		if(typeof(look._AGENT_DIC) == "undefined"){
			Look.prototype._AGENT_DIC = null;
		}
		look._AGENT_DIC == null ? appGetAgentListRequest() : callback();
	},
	Convert : function(back){
		if (back.code == 0) {
			if (back.data.length != 0) {
				look._AGENT_DIC = back.data;
				$("#agentSelect").length != 0 ? appGetAgentListCallback.AssaySelect() : null;
			}
			else {
				look.showInfo.error(back.code + "：代理商数据为空");
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	},
	AssaySelect : function(){
		look._AGENT_DIC.length == 1 ? $("#agentSelect").empty() : $("#agentSelect").children().slice(1).remove();
		$.each(look._AGENT_DIC, function(i, list){
			$("#agentSelect").append('<option value="' + list.name + '" channels="' + list.channels + '">' + list.name + '</option>');
		});
		//[事件]
		$("#agentSelect").unbind("change").bind("change", function(){
			selectChangeFn($(this).val());
		}).children("option[value='" + look.getHashParam("agent") + "']").attr("selected", "selected");
		$("#channelSelect").bind("change", function(){
			$(this).val() == "input" ?  $(this).next().show() : $(this).next().hide();
		});
		
		selectChangeFn($("#agentSelect option[value='" + look.getHashParam("agent") + "']"));
		
		function selectChangeFn(agent){
			var channel = $("#agentSelect option:selected").attr("channels"),
				selectHtml = "", channelArray = new Array();
			$("#channelSelect").children().remove();$("#channelCell").hide();
			if(channel){
				$.each(channel.split(","), function(j, list){
					selectHtml += '<option value="' + list + '">' + list + '</option>';
				});
//				selectHtml += '<option value="input">手动输入</option>';
				$("#channelSelect").append(selectHtml).children("option[value='" + look.getHashParam("channel") + "']").attr("selected", "selected");
				$("#channelCell").show();
			}
		}
	}
}

//*************************************
//* 应用管理系统 -> 应用下载地址管理
//* 获取callback
//*************************************
var appGetAppDownloadListCallback = function(back){
	var appDownloadManageList = $("#appDownloadManageList");
	appDownloadManageList.empty();$("#resultCount").text("-");
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "0"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				appDownloadManageList.append(
					'<div class="publisher_panel">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">渠道：' + list.channel + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">http下载地址：</span><span><a href="javascript:" class="url_subset" title="' + list.downloadUrl + '">' + look.getByteVal(list.downloadUrl, 56) + (look.getByteLen(list.downloadUrl) > 56 ? '..' : '') + '</a></span></div>' +
					'		<div class="publisher_row"><span class="label">市场下载地址：</span><span><a href="javascript:" class="url_subset" title="' + list.marketUrl + '">' + look.getByteVal(list.marketUrl, 56) + (look.getByteLen(list.marketUrl) > 56 ? '..' : '') + '</a></span></div>' +
					'		<div class="publisher_row"><span class="label">评分地址：</span><span><a href="javascript:" class="url_subset" title="' + list.evaluateUrl + '">' + look.getByteVal(list.evaluateUrl, 56) + (look.getByteLen(list.evaluateUrl) > 56 ? '..' : '') + '</a></span></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					(publicInit.authenCheck(look._AUTHEN.app, 7) ? '<a href="javascript:" class="a_as_button a_as_green modify_app_download_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' + 
					'<div class="publisher_panel look_hidden"><form>' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">渠道：' + list.channel + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<label for="downloadUrl' + list.id + '" class="publisher_label"><tt><i>http下载地址</i></tt><input type="text" class="text" id="downloadUrl' + list.id + '" name="downloadUrl" value="' + list.downloadUrl + '" /></label>' +
					'		<label for="marketUrl' + list.id + '" class="publisher_label"><tt><i>市场下载地址</i></tt><input type="text" class="text" id="marketUrl' + list.id + '" name="marketUrl" value="' + list.marketUrl + '" /></label>' +
					'		<label for="evaluateUrl' + list.id + '" class="publisher_label"><tt><i>评分地址</i></tt><input type="text" class="text" id="evaluateUrl' + list.id + '" name="evaluateUrl" value="' + list.evaluateUrl + '" /></label>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_app_download_subset" a_id="' + list.id + '">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'</form></div>'
				);
			});
			appDownloadManageList.append('<div class="clear"></div>');
			publicInit.inputTipStyle("#appDownloadManageList input.text", "#appDownloadManageList label tt");
			//[事件]查看链接地址
			$(".url_subset").unbind("click").bind("click", function(event){
				$.lookPop({
					type: -1,
					title: look._I18N_DATA.$732/**完整链接**/,
					closeSubset: true,
					html:
						'<div style="width:620px;">' +
						'	<div class="pop_content_word">' +
						'		<p>' + $(this).attr("title") + '</p>' +
						'	</div>' +
						'</div>'
				});
				look.selectContents(".pop_content_word p");
				$(".pop_content_word p").bind("click", function(){look.selectContents($(this));});
			});
			//[事件]修改
			$(".modify_app_download_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().find("input:first").focus();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]确认修改
			$(".comfirm_modify_app_download_subset").unbind("click").bind("click", function(){
				var element = $(this).parents("form"),
					id = $(this).attr("a_id");
					isUrlEmpty = null;
				element.find("input.text").each(function(){
					if($.trim($(this).val()) == ""){isUrlEmpty = $(this);return false;}
				});
				if(isUrlEmpty){look.showInfo.error("所有地址都不能为空…");isUrlEmpty.focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">确定修改本条应用下载地址？</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						appModifyAppDownloadListRequest(id, '&' + element.serialize());
					}
				});
			});
		}else{
			appDownloadManageList.html('<p class="no_result">没有任何数据</p>');
		}
	}else{
		appDownloadManageList.html('<p class="no_result">没有任何数据</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 应用下载地址管理
//* 新增callback
//*************************************
var appCreateAppDownloadListCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv({"id": ".add_app_poper"});
		look.showInfo.right(back.code + "：创建成功！");
		location.hash = look.setParam([["appid", $("#appIdSelect").val()], ["agent", $("#agentSelect").val()]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 应用下载地址管理
//* 修改callback
//*************************************
var appModifyAppDownloadListCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + "：修改成功！");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 分服管理
//* 获取callback
//*************************************
var appGetAppServerCallback = function(back){
	var appServerManageList = $("#appServerManageList");
	appServerManageList.empty();$("#resultCount").text("-");
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "0"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				var maintenanceHtml = "", maintenanceSelectHtml = '<select name="maintenance"><option value="">请选择</option>', serverNameHtml = "";
				switch(list.maintenance){
					case 0 : maintenanceHtml = "不维护"; maintenanceSelectHtml += '<option value="0" selected>不维护</option><option value="1">维护</option>';
					break;
					case 1 : maintenanceHtml = "维护"; maintenanceSelectHtml += '<option value="0">不维护</option><option value="1" selected>维护</option>';
					break;
					default : maintenanceHtml = "未知"; maintenanceSelectHtml += '<option value="0">不维护</option><option value="1">维护</option>';
				}
				maintenanceSelectHtml += '</select>';
				if (look._STAT_INCOME_DIC_ARRAY[2].length != 0) {
					$.map(look._STAT_INCOME_DIC_ARRAY[2], function(n){
						var defaultServerName = "", nameId = '';
						$.each(list.nameList, function(j, m){
							if(m.language == n[0]) {
								defaultServerName = m.nameStr;
								nameId = m.id;
							}
						});
						serverNameHtml +=
							'<div class="publisher_row"><span class="label">名称[' + n[0] + ']：</span><span>' + (defaultServerName == "" ? "空" : defaultServerName) + '</span>' + (publicInit.authenCheck(look._AUTHEN.app, 13) && publicInit.authenCheck(look._AUTHEN.app, 14) ? '<a class="a_as_icon modify_name_subset" href="javascript:"><tt title="修改名称" class="icon edit_icon"></tt></a>' : '') + '</div>' +
							'<div class="publisher_row look_hidden"><span class="label">名称[' + n[0] + ']：</span><span><input type="text" name_id="' + nameId + '" s_id="' + list.name + '" s_lang="' + n[0] + '" s_name="' + defaultServerName + '" value="' + defaultServerName + '" class="text normal"></span><a class="a_as_button confirm_modify_name_subset" href="javascript:">确定</a><a class="a_as_button a_as_gray cancel_modify_name_subset" href="javascript:">取消</a></div>';
					});
				}
				appServerManageList.append(
					'<div class="publisher_panel">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">渠道：' + list.channel + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">分服ID：</span><span>' + list.serverId + '</span></div>' +
							serverNameHtml +
					'		<div class="publisher_row"><span class="label">是否维护：</span><span>' + maintenanceHtml + '</span></div>' +
					'		<div class="publisher_row"><span class="label">测试地址：</span><span><a href="javascript:" class="url_subset" title="' + list.testUrl + '">' + look.getByteVal(list.testUrl, 56) + (look.getByteLen(list.testUrl) > 56 ? '..' : '') + '</a></span></div>' +
					'		<div class="publisher_row"><span class="label">正式地址：</span><span><a href="javascript:" class="url_subset" title="' + list.onlineUrl + '">' + look.getByteVal(list.onlineUrl, 56) + (look.getByteLen(list.onlineUrl) > 56 ? '..' : '') + '</a></span></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					(publicInit.authenCheck(look._AUTHEN.app, 12) ? '<a href="javascript:" class="a_as_button a_as_green modify_app_server_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' + 
					'<div class="publisher_panel look_hidden">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">渠道：' + list.channel + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">分服ID：</span><span>' + list.serverId + '</span></div>' +
							serverNameHtml +
					'		<form>' +
					'		<div class="publisher_row"><span class="label">是否维护：</span><span>' + maintenanceSelectHtml + '</span></div>' +
					'		<label for="testUrl' + list.id + '" class="publisher_label"><tt><i>测试地址</i></tt><input type="text" class="text" id="testUrl' + list.id + '" name="testUrl" value="' + list.testUrl + '" /></label>' +
					'		<label for="onlineUrl' + list.id + '" class="publisher_label"><tt><i>正式地址</i></tt><input type="text" class="text" id="onlineUrl' + list.id + '" name="onlineUrl" value="' + list.onlineUrl + '" /></label>' +
					'		</form>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_app_server_subset" s_id="' + list.id + '">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'</div>'
				);
			});
			appServerManageList.append('<div class="clear"></div>');
			publicInit.inputTipStyle("#appServerManageList input.text", "#appServerManageList label tt");
			//[事件]查看链接地址
			$(".url_subset").unbind("click").bind("click", function(event){
				$.lookPop({
					type: -1,
					title: look._I18N_DATA.$732/**完整链接**/,
					closeSubset: true,
					html:
						'<div style="width:620px;">' +
						'	<div class="pop_content_word">' +
						'		<p>' + $(this).attr("title") + '</p>' +
						'	</div>' +
						'</div>'
				});
				look.selectContents(".pop_content_word p");
				$(".pop_content_word p").bind("click", function(){look.selectContents($(this));});
			});
			//[事件]修改
			$(".modify_app_server_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().find("form input:first").focus();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]确认修改
			$(".comfirm_modify_app_server_subset").unbind("click").bind("click", function(){
				var element = $(this).parents(".publisher_panel").find("form"),
					id = $(this).attr("s_id");
					isEmpty = null;
				element.find("select, input.text").each(function(){
					if($.trim($(this).val()) == ""){isEmpty = $(this);return false;}
				});
				if(isEmpty){look.showInfo.error("所有选项和地址都不能为空…");isEmpty.focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">确定修改此分服？</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						appModifyAppServerRequest(id, '&' + element.serialize());
					}
				});
			});
			//[事件]修改名称
			$(".modify_name_subset").unbind("click").bind("click",function(){
				$(this).parents(".publisher_row").hide().next().show().find("input.text").focus();
			});
			//[事件]取消修改名称
			$(".cancel_modify_name_subset").unbind("click").bind("click",function(){
				$(this).parents(".publisher_row").hide().prev().show();
			});
			//[事件]确认修改名称
			$(".confirm_modify_name_subset").unbind("click").bind("click",function(){
				var element = $(this).prev().children("input.text"),
					prevServerName = element.attr("s_name"),
					id = element.attr("s_id"),
					nameId = element.attr("name_id"),
					serverLang = element.attr("s_lang"),
					serverName = $.trim(element.val());
				if(serverName == ""){look.showInfo.error("名称不能为空…");element.focus();return false;}
				if(serverName == prevServerName){look.showInfo.error("没有任何修改…");element.focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">确定修改此分服的<b class="color_yellow">' + serverLang + '</b>名称？</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						look._TEMP = function(){
							element.attr({"s_name": serverName}).parents(".publisher_row").hide().prev().show().children("span").eq(1).text(serverName);
						}
						if (nameId != "") {
							appModifyLangRequest(nameId, serverName);
						} else {
							appCreateLangRequest(id, serverLang, serverName);
						}
					}
				});
			});
		}else{
			appServerManageList.html('<p class="no_result">没有任何数据</p>');
		}
	}else{
		appServerManageList.html('<p class="no_result">没有任何数据</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 分服管理
//* 新增callback
//*************************************
var appCreateAppServerCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv({"id": ".add_app_poper"});
		look.showInfo.right(back.code + "：创建分服成功！");
		location.hash = look.setParam([["appid", $("#appIdSelect").val()], ["agent", $("#agentSelect").val()]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 分服管理
//* 修改callback
//*************************************
var appModifyAppServerCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + "：修改分服成功！");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 语言管理
//* 新增callback
//*************************************
var appCreateLangCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + "：新增名称成功！");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 语言管理
//* 修改callback
//*************************************
var appModifyLangCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + "：修改名称成功！");
		look._TEMP();
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 版本管理
//* 获取callback
//*************************************
var appGetAppVersionCallback = function(back){
	var appVersionManageList = $("#appVersionManageList");
	appVersionManageList.empty();$("#resultCount").text("-");
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "0"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				var forceUpdateHtml = "", forceUpdateSelectHtml = '<select name="forceUpdate"><option value="">请选择</option>';
				switch(list.forceUpdate){
					case 0 : forceUpdateHtml = "否"; forceUpdateSelectHtml += '<option value="0" selected>否</option><option value="1">是</option>';
					break;
					case 1 : forceUpdateHtml = "是"; forceUpdateSelectHtml += '<option value="0">否</option><option value="1" selected>是</option>';
					break;
					default : forceUpdateHtml = "未知"; forceUpdateSelectHtml += '<option value="0">否</option><option value="1">是</option>';
				}
				forceUpdateSelectHtml += '</select>';
				appVersionManageList.append(
					'<div class="publisher_panel">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">渠道：' + list.channel + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">当前版本：</span><span>' + list.currentVersion + '</span></div>' +
					'		<div class="publisher_row"><span class="label">测试版本：</span><span>' + list.testVersion + '</span></div>' +
					'		<div class="publisher_row"><span class="label">是否强制更新：</span><span>' + forceUpdateHtml + '</span></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					(publicInit.authenCheck(look._AUTHEN.app, 19) ? '<a href="javascript:" class="a_as_button a_as_green modify_app_version_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' + 
					'<div class="publisher_panel look_hidden">' +
					'	<form>' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">渠道：' + list.channel + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<label for="testUrl' + list.id + '" class="publisher_label"><tt><i>当前版本</i></tt><input type="text" class="text" id="currentVersion' + list.id + '" name="currentVersion" value="' + list.currentVersion + '" /></label>' +
					'		<label for="onlineUrl' + list.id + '" class="publisher_label"><tt><i>测试版本</i></tt><input type="text" class="text" id="testVersion' + list.id + '" name="testVersion" value="' + list.testVersion + '" /></label>' +
					'		<div class="publisher_row"><span class="label">是否强制更新：</span><span>' + forceUpdateSelectHtml + '</span></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_app_version_subset" v_id="' + list.id + '">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'	</form>' +
					'</div>'
				);
			});
			appVersionManageList.append('<div class="clear"></div>');
			publicInit.inputTipStyle("#appVersionManageList input.text", "#appVersionManageList label tt");
			//[事件]修改
			$(".modify_app_version_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().find("form input:first").focus();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]确认修改
			$(".comfirm_modify_app_version_subset").unbind("click").bind("click", function(){
				var element = $(this).parents(".publisher_panel").find("form"),
					id = $(this).attr("v_id");
					isEmpty = null;
				element.find("select, input.text").each(function(){
					if($.trim($(this).val()) == ""){isEmpty = $(this);return false;}
				});
				if(isEmpty){look.showInfo.error("所有选项都不能为空…");isEmpty.focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">确定修改此版本信息？</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						appModifyAppVersionRequest(id, '&' + element.serialize());
					}
				});
			});
		}else{
			appVersionManageList.html('<p class="no_result">没有任何数据</p>');
		}
	}else{
		appVersionManageList.html('<p class="no_result">没有任何数据</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 版本管理
//* 新增callback
//*************************************
var appCreateAppVersionCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv({"id": ".add_app_poper"});
		look.showInfo.right(back.code + "：创建版本成功！");
		location.hash = look.setParam([["appid", $("#appIdSelect").val()], ["agent", $("#agentSelect").val()]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 版本管理
//* 修改callback
//*************************************
var appModifyAppVersionCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + "：修改版本信息成功！");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 广告配置
//* 获取callback
//*************************************
var appGetAppAdConfigCallback = function(back){
	var appAdConfigList = $("#appAdConfigList");
	appAdConfigList.empty();$("#resultCount").text("-");
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "0"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				appAdConfigList.append(
					'<div class="publisher_panel">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">渠道：' + list.channel + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">广告商：</span><span>' + list.adName + '</span></div>' +
					'		<div class="publisher_row"><span class="label">值：</span><span>' + list.adVal + '</span></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					(publicInit.authenCheck(look._AUTHEN.app, 24) ? '<a href="javascript:" class="a_as_button a_as_green modify_app_ad_config_subset">' + look._I18N_DATA.$607/**修改**/ + '</a>' : '') +
					'		</div>' +
					'	</div>' +
					'</div>' + 
					'<div class="publisher_panel look_hidden">' +
					'	<form>' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">渠道：' + list.channel + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell">' +
					'		<div class="publisher_row"><span class="label">广告商：</span><span>' + list.adName + '</span></div>' +
					'		<div class="publisher_row"><span class="label">值：</span><span><input type="text" class="text auto" name="adVal" value="' + list.adVal + '" /></span></div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="subset_cell no_margin">' +
					'			<a href="javascript:" class="a_as_button comfirm_modify_app_ad_config_subset" ad_id="' + list.id + '">' + look._I18N_DATA.$600/**确定**/ + '</a><a href="javascript:" class="a_as_button a_as_gray cancel_modify_subset">' + look._I18N_DATA.$601/**取消**/ + '</a>' +
					'		</div>' +
					'	</div>' +
					'	</form>' +
					'</div>'
				);
			});
			appAdConfigList.append('<div class="clear"></div>');
			//[事件]修改
			$(".modify_app_ad_config_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().next(".publisher_panel").show().find("form input:first").focus();
			});
			//[事件]取消修改
			$(".cancel_modify_subset").unbind("click").bind("click", function(){
				$(this).parents(".publisher_panel").hide().prev(".publisher_panel").show();
			});
			//[事件]确认修改
			$(".comfirm_modify_app_ad_config_subset").unbind("click").bind("click", function(){
				var element = $(this).parents(".publisher_panel").find("form"),
					id = $(this).attr("ad_id");
					isEmpty = null;
				element.find("select, input.text").each(function(){
					if($.trim($(this).val()) == ""){isEmpty = $(this);return false;}
				});
				if(isEmpty){look.showInfo.error("所有选项都不能为空…");isEmpty.focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">确定修改此广告配置？</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						appModifyAppAdConfigRequest(id, '&' + element.serialize());
					}
				});
			});
		}else{
			appAdConfigList.html('<p class="no_result">没有任何数据</p>');
		}
	}else{
		appAdConfigList.html('<p class="no_result">没有任何数据</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 广告配置
//* 新增callback
//*************************************
var appCreateAppAdConfigCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv({"id": ".add_app_poper"});
		look.showInfo.right(back.code + "：创建广告配置成功！");
		location.hash = look.setParam([["appid", $("#appIdSelect").val()], ["agent", $("#agentSelect").val()]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 广告配置
//* 修改callback
//*************************************
var appModifyAppAdConfigCallback = function(back){
	if (back.code == 0) {
		$.clearPop();
		look.showInfo.right(back.code + "：修改广告配置成功！");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 资源管理
//* 获取callback
//*************************************
var appGetAppResourceCallback = function(back){
	var appResourceManageList = $("#appResourceManageList");
	appResourceManageList.empty();$("#resultCount").text("-");
	if (back.code == 0) {
		$("#resultCount").text((back.data ? back.data.length : "0"));
		if (back.data.length != 0) {
			$.each(back.data, function(i, list){
				appResourceManageList.append(
					'<div class="publisher_panel">' +
					'	<div class="publisher_cell top">' +
					'		<div class="publisher_title">ID：' + list.id + '</div>' +
					'	</div>' +
					'	<div class="publisher_cell bottom">' +
					'		<div class="publisher_row"><span class="label">分服：</span><span>' + list.serverId + '</span></div>' +
					'		<div class="publisher_row"><span class="label">渠道：</span><span>' + list.channel + '</span></div>' +
					'		<div class="publisher_row"><span class="label">语言：</span><span>' + list.locale + '</span></div>' +
					'		<div class="publisher_row"><span class="label">md5：</span><span>' + list.md5 + '</span></div>' +
					'		<div class="publisher_row"><span class="label">type：</span><span>' + list.type + '</span></div>' +
					'		<div class="publisher_row"><span class="label">version：</span><span>' + list.version + '</span></div>' +
					'		<div class="publisher_row"><span class="label">url：</span><span><a href="javascript:" class="url_subset" title="' + list.url + '">' + look.getByteVal(list.url, 56) + (look.getByteLen(list.url) > 56 ? '..' : '') + '</a></span></div>' +
					'	</div>' +
					'</div>'
				);
			});
			appResourceManageList.append('<div class="clear"></div>');
			//[事件]查看链接地址
			$(".url_subset").unbind("click").bind("click", function(event){
				$.lookPop({
					type: -1,
					title: look._I18N_DATA.$732/**完整链接**/,
					closeSubset: true,
					html:
						'<div style="width:620px;">' +
						'	<div class="pop_content_word">' +
						'		<p>' + $(this).attr("title") + '</p>' +
						'	</div>' +
						'</div>'
				});
				look.selectContents(".pop_content_word p");
				$(".pop_content_word p").bind("click", function(){look.selectContents($(this));});
			});
		}else{
			appResourceManageList.html('<p class="no_result">没有任何数据</p>');
		}
	}else{
		appResourceManageList.html('<p class="no_result">没有任何数据</p>');
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* 应用管理系统 -> 资源管理
//* 修改callback
//*************************************
var appModifyAppResourceCallback = function(back){
	if (back.code == 0) {
		$.clearPop();$.clearPopDiv({"id": ".add_app_poper"});
		look.showInfo.right(back.code + "：修改资源成功！");
		location.hash = look.setParam([[]], location.hash);
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** app Callback END ***/

/*** apple_top Callback START ***/

//*************************************
//* Apple排行系统 -> 公共
//* 获取国家字典callback
//*************************************
var appleGetCountriesDictionaryCallback = {
	Check : function(callback){
		if(typeof(look._APPLE_TOP_COUNTRIES_DIC) == "undefined"){
			Look.prototype._APPLE_TOP_COUNTRIES_DIC = null;
		}
		look._APPLE_TOP_COUNTRIES_DIC == null ? appleGetCountriesDictionaryRequest() : typeof(callback) == "function" ? callback() : null;
	},
	Convert : function(back){
		if (back.code == 0) {
			if (back.data.feed_country && back.data.feed_country.length != 0) {
				look._APPLE_TOP_COUNTRIES_DIC = back.data.feed_country;
			} else {
				look.showInfo.error(back.code + "：国家字典数据为空");
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* Apple排行系统 -> 公共
//* 获取媒体类型字典callback
//*************************************
var appleGetMediaTypesDictionaryCallback = {
	Check : function(callback){
		if(typeof(look._APPLE_TOP_MEDIA_TYPES_DIC) == "undefined"){
			Look.prototype._APPLE_TOP_MEDIA_TYPES_DIC = null;
		}
		look._APPLE_TOP_MEDIA_TYPES_DIC == null ? appleGetMediaTypesDictionaryRequest() : typeof(callback) == "function" ? callback() : null;
	},
	Convert : function(back){
		if (back.code == 0) {
			if (back.data && back.data.length != 0) {
				look._APPLE_TOP_MEDIA_TYPES_DIC = back.data;
			} else {
				look.showInfo.error(back.code + "：媒体类型字典数据为空");
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* Apple排行系统 -> 公共
//* 获取国家对应的商店callback
//*************************************
var appleGetStoreCallback = {
	Check : function(callback){
		if(typeof(look._APPLE_TOP_STORE_DIC) == "undefined"){
			Look.prototype._APPLE_TOP_STORE_DIC = null;
		}
		look._APPLE_TOP_STORE_DIC == null ? appleGetStoreRequest() : typeof(callback) == "function" ? callback() : null;
	},
	Convert : function(back){
		if (back.code == 0) {
			if (back.data && back.data.length != 0) {
				look._APPLE_TOP_STORE_DIC = back.data;
			} else {
				look.showInfo.error(back.code + "：媒体类型为空");
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* Apple排行系统 -> 公共
//* 获取商店对应的媒体类型callback
//*************************************
var appleGetFeedTypesCallback = {
	Check : function(callback){
		if(typeof(look._APPLE_TOP_FEED_TYPES_DIC) == "undefined"){
			Look.prototype._APPLE_TOP_FEED_TYPES_DIC = null;
		}
		look._APPLE_TOP_FEED_TYPES_DIC == null ? appleGetFeedTypesRequest() : typeof(callback) == "function" ? callback() : null;
	},
	Convert : function(back){
		if (back.code == 0) {
			if (back.data && back.data.length != 0) {
				look._APPLE_TOP_FEED_TYPES_DIC = back.data;
			} else {
				look.showInfo.error(back.code + "：Feed Type和类型数据为空");
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* Apple排行系统 -> 公共
//* 获取商店对应的媒体类型callback
//*************************************
var appleGetSearchConditionCallback = {
	Check : function(callback){
		if(typeof(look._APPLE_TOP_SEARCH_CONDITION_DIC) == "undefined"){
			Look.prototype._APPLE_TOP_SEARCH_CONDITION_DIC = null;
		}
		look._APPLE_TOP_SEARCH_CONDITION_DIC == null ? appleGetSearchConditionRequest() : typeof(callback) == "function" ? callback() : null;
	},
	Convert : function(back){
		if (back.code == 0) {
			if (back.data && back.data.length != 0) {
				look._APPLE_TOP_SEARCH_CONDITION_DIC = back.data;
			} else {
				look.showInfo.error(back.code + "：查询筛分条件数据为空");
			}
		}else{
			look.showInfo.error(back.code + ":" + back.message);
		}
	}
}

//*************************************
//* Apple排行系统 -> iTunes Store排行榜
//* 获取callback
//*************************************
var appleGetITunesStoreTopCallback = function(back){
	if (back.code == 0) {
		var appleItunesStoreTopList = $("#appleItunesStoreTopList");
		appleItunesStoreTopList.empty();
		if(back.data){
			$("#appleItunesStoreTopTitleCell").text(back.data.topTitle ? back.data.topTitle : "").attr("top_id", back.data.topId ? back.data.topId : "");
			if(back.data.topEntry && back.data.topEntry.length != 0){
				$.each(back.data.topEntry, function(i, list){
					var appRankHtml = "";
					appleItunesStoreTopList.append(
						'<div class="entry_cell look_box_shadow look_box_corner" app_id="' + list.appId + '">' +
						'	<div class="number" title="当前排行">' + list.appRank + '</div>' +
						(list.bestRank != 0 ? '<div class="number tag" title="历史最高排行">' + list.bestRank + '</div>' : '<div class="number tag maiden" title="首次进榜">首次</div>') +
						'	<div class="left">' +
						'		<div class="image_cell"><a href="' + list.appUrl + '" target="_blank"><img src="' +  (list.appImage != "" ? list.appImage.split(",")[2] : "../images/no_picture.png") + '"/></a></div>' +
						'	</div>' +
						'	<div class="right">' +
						'		<div class="title"><a href="' + list.appUrl + '" target="_blank">' + decodeURIComponent(list.appName) + '</a></div>' +
						'		<p><span class="label">类型：</span><span title="' + list.appCategoryLabel + '" target="_blank">' + list.appCategoryTerm + '</span></p>' +
						'		<p><span class="label">Artist：</span>' + list.appArtist + '</p>' +
						'		<p><span class="label">价格[' + list.appPriceCurrency + ']：</span>' + list.appPrice + '</p>' +
						'		<p><span class="label">数据获取日期：</span>' + list.createTime + '</p>' +
//						'		<p><span class="label">摘要：</span><span>' + (list.appSummary ? look.getByteLen(decodeURIComponent(list.appSummary)) > 220 ? look.getByteVal(look.encodeHtml(decodeURIComponent(list.appSummary)), 220) + '..<a href="javascript:" class="blue underline more_summary_subset" s_title="' + list.appSummary + '">更多</a>' : decodeURIComponent(list.appSummary) : "暂不提供") + '</span></p>' +
						'	</div>' +
						'	<div class="clear"></div>' +
						'</div>'
					);
				});
				//[事件]查看详细
//				$(".content_subset").unbind("click").bind("click", function(){
//					var appId = $(this).parents(".entry_cell").attr("app_id"),
//						appName = $(this).parents(".entry_cell").find(".title").text();
//					$.lookPop({
//						type: -1,
//						title: "详细内容 - " + look.getByteVal(appName, 80) + (look.getByteLen(appName) > 80 ?  ".." : ""),
//						html: '<div class="pop_content_text pop_cell pop_app_content_cell" id="popAppContentCell"><img src="../images/small_loader.gif" class="loader_icon" /></div>',
//					});
//					appleGetAppContentRequest(back.data.topId, back.data.topUpdated, appId);
//				});
				//[事件]更多摘要
//				$(".more_summary_subset").unbind("click").bind("click", function(){
//					var summary = $(this).attr("s_title"),
//						appName = $(this).parents(".entry_cell").find(".title").text();
//					$.lookPop({
//						type: -1,
//						title: "详细摘要 - " + look.getByteVal(appName, 80) + (look.getByteLen(appName) > 80 ?  ".." : ""),
//						html: '<div class="pop_content_text pop_cell">' + decodeURIComponent(summary).replace(/[(\n)|(\r)]/g, "<br/>") + '</div>'
//					});
//				});
			}else{
				appleItunesStoreTopList.append('<div class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</div>');
			}
		}else{
			appleItunesStoreTopList.append('<div class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</div>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

//*************************************
//* Apple排行系统 -> 应用详细信息
//* 获取callback
//*************************************
var appleGetAppContentCallback = function(back){
	var popAppContentCell = $("#popAppContentCell");
	if (back.code == 0) {
		if (back.data && back.data != "") {
			popAppContentCell.html(decodeURIComponent(back.data).replace(/[(\r)]/g, "<br/>"));
			$.positionDiv();
		}else{
			popAppContentCell.html('<div class="no_result">' + look._I18N_DATA.$304/**没有任何数据，请输入有效查询条件…**/ + '</div>');
		}
	}else{
		look.showInfo.error(back.code + ":" + back.message);
	}
}

/*** apple_top Callback END ***/